Class: FixToChix::FixtureSelector
- Inherits:
-
Object
- Object
- FixToChix::FixtureSelector
- Defined in:
- lib/fix_to_chix/fixture_selector.rb
Instance Attribute Summary collapse
-
#spec_fixtures_dir ⇒ Object
readonly
Returns the value of attribute spec_fixtures_dir.
-
#test_fixtures_dir ⇒ Object
readonly
Returns the value of attribute test_fixtures_dir.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ FixtureSelector
constructor
A new instance of FixtureSelector.
- #spec_fixtures ⇒ Object
- #test_fixtures ⇒ Object
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(={}) @test_fixtures_dir = [:test_fixtures_dir] || TEST_FIXTURES @spec_fixtures_dir = [:spec_fixtures_dir] || SPEC_FIXTURES @matching = [:matching] end |
Instance Attribute Details
#spec_fixtures_dir ⇒ Object (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_dir ⇒ Object (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_fixtures ⇒ Object
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_fixtures ⇒ Object
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 |