Permalink
Browse files

Changed string casting spec

Changed spec regarding reader casting to String, was testing it based on
Float values, which is inherently imprecise, but acceptable behaviour
(JDBC already returns imprecise value), changed it to test on
Integer
  • Loading branch information...
1 parent 1a974de commit 63ae1bddb491db59eb5e86fec37ff51b82b09825 @jwkoelewijn jwkoelewijn committed May 11, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 data_objects/lib/data_objects/spec/shared/typecast/string_spec.rb
View
4 data_objects/lib/data_objects/spec/shared/typecast/string_spec.rb
@@ -41,7 +41,7 @@
describe 'with manual typecasting' do
before do
- @command = @connection.create_command("SELECT weight FROM widgets WHERE ad_description = ?")
+ @command = @connection.create_command("SELECT number_sold FROM widgets WHERE ad_description = ?")
@command.set_types(String)
@reader = @command.execute_reader('Buy this product now!')
@reader.next!
@@ -57,7 +57,7 @@
end
it 'should return the correct result' do
- @values.first.should == "13.4"
+ @values.first.should == "0"
end
end

0 comments on commit 63ae1bd

Please sign in to comment.