Class: FixToChix::FixtureSelector

Inherits:
Object
  • Object
show all
Defined in:
lib/fix_to_chix/fixture_selector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ FixtureSelector

Returns a new instance of FixtureSelector.



7
8
9
10
11
# File 'lib/fix_to_chix/fixture_selector.rb', line 7

def initialize(options={})
  @test_fixtures_dir = options[:test_fixtures_dir] || TEST_FIXTURES
  @spec_fixtures_dir = options[:spec_fixtures_dir] || SPEC_FIXTURES
  @matching = options[:matching]
end

Instance Attribute Details

#spec_fixtures_dirObject (readonly)

Returns the value of attribute spec_fixtures_dir.



5
6
7
# File 'lib/fix_to_chix/fixture_selector.rb', line 5

def spec_fixtures_dir
  @spec_fixtures_dir
end

#test_fixtures_dirObject (readonly)

Returns the value of attribute test_fixtures_dir.



5
6
7
# File 'lib/fix_to_chix/fixture_selector.rb', line 5

def test_fixtures_dir
  @test_fixtures_dir
end

Instance Method Details

#spec_fixturesObject



13
14
15
16
# File 'lib/fix_to_chix/fixture_selector.rb', line 13

def spec_fixtures
  all_fixtures = fetch_fixtures.select {|f| f =~ /spec/ }
  filter(all_fixtures)
end

#test_fixturesObject



18
19
20
21
# File 'lib/fix_to_chix/fixture_selector.rb', line 18

def test_fixtures
  all_fixtures = fetch_fixtures.select {|f| f =~ /test/ }
  filter(all_fixtures)
end