Permalink
Browse files

ConfCreator initializer takes an array of yaml files rather than a splat

  • Loading branch information...
1 parent f6e328c commit 0bfc75b3a80bbb284569428896521acfa35b0a0e Brandon Tilley committed Jan 7, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/dataloaderb/conf_creator.rb
  2. +2 −2 spec/dataloaderb/conf_creator_spec.rb
@@ -10,7 +10,7 @@ class ConfCreator
attr_reader :processes
# Create a new instance of a ConfCreator
- def initialize(*yamls)
+ def initialize(yamls)
@processes = []
build_process_definitions(yamls)
end
@@ -8,13 +8,13 @@
FIXTURE_PROCESSES[:full_process_one]
]
# ConfCreator#new expects multiple arguments, not an array, thus we splat
- @creator = Dataloaderb::ConfCreator.new(*@yamls)
+ @creator = Dataloaderb::ConfCreator.new(@yamls)
end
context "#build_process_definitions" do
it "should build a process definition for each yaml file" do
@creator.processes.count.should == 1
- @creator = Dataloaderb::ConfCreator.new(FIXTURE_PROCESSES[:full_process_one], FIXTURE_PROCESSES[:full_process_two])
+ @creator = Dataloaderb::ConfCreator.new([FIXTURE_PROCESSES[:full_process_one], FIXTURE_PROCESSES[:full_process_two]])
@creator.processes.count.should == 2
end
end

0 comments on commit 0bfc75b

Please sign in to comment.