Skip to content

Commit

Permalink
make the specs pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Eberly committed Jun 22, 2011
1 parent 8063f3d commit 97962fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions features/algebra.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ Feature: Perform relational algebra
"""
Then the output should contain:
"""
SELECT * FROM `users`
SELECT * FROM `users`
---
John,Smith
Mary,Smith
---
"""

Scenario: Perform a restriction
Expand Down Expand Up @@ -67,10 +68,11 @@ Feature: Perform relational algebra
"""
Then the output should contain:
"""
SELECT * FROM `users` WHERE `users`.`first_name` = 'John'
SELECT * FROM `users` WHERE `users`.`first_name` = 'John'
---
John,Smith
---
"""

Scenario: Perform an inner join
Expand Down
2 changes: 0 additions & 2 deletions features/steps/model_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
Orel.recreate_database!
Orel.create_tables!
#{string}
puts "done running code"
EOF
When %{I run `ruby -I ../lib runner.rb`}
Then %{the output should contain:}, "done running code"
end

4 changes: 2 additions & 2 deletions spec/attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
end
its(:changed?) { should be_true }
its(:changed) { should == [:name] }
its(:changes) { should == { :name => [nil, 'Bob'] } }
its(:changes) { should == { "name" => [nil, 'Bob'] } }
its(:previous_changes) { should be_empty }
its(:changed_attributes) { should == { :name => nil } }
end
Expand All @@ -101,7 +101,7 @@
end
its(:changed?) { should be_true }
its(:changed) { should == [:name] }
its(:changes) { should == { :name => ['John', 'Bob'] } }
its(:changes) { should == { "name" => ['John', 'Bob'] } }
its(:previous_changes) { should be_empty }
its(:changed_attributes) { should == { :name => 'John' } }
end
Expand Down

0 comments on commit 97962fe

Please sign in to comment.