spec/integration/simpledb_adapter_spec.rb in dm-adapter-simpledb-1.3.0 vs spec/integration/simpledb_adapter_spec.rb in dm-adapter-simpledb-1.4.0

- old
+ new

@@ -136,36 +136,18 @@ lambda {Friend.get!(@friend.id, @friend.name)}.should raise_error(DataMapper::ObjectNotFoundError) persons = Friend.all(:name => @friend.name) persons.length.should == 0 end - describe '#query' do - before(:each) do - @domain = Friend.repository(:default).adapter.sdb_options[:domain] - end - it "should return an array of records" do - records = Friend.repository(:default).adapter.query("SELECT age, wealth from #{@domain} where age = '25'") - records.should == [{"wealth"=>["25.0"], "age"=>["25"]}] - end - it "should return empty array if no matches" do - records = Friend.repository(:default).adapter.query("SELECT age, wealth from #{@domain} where age = '15'") - records.should be_empty - end - it "should raise an error if query is invalid" do - lambda do - records = Friend.repository(:default).adapter.query("SELECT gaga") - end.should raise_error(RightAws::AwsError) - end - end describe 'aggregate' do it "should respond to count(*)" do Friend.count.should == 1 end it "should not respond to any other aggregates" do - lambda { Friend.min(:age) }.should raise_error(ArgumentError) - lambda { Friend.max(:age) }.should raise_error(ArgumentError) - lambda { Friend.avg(:age) }.should raise_error(ArgumentError) - lambda { Friend.sum(:age) }.should raise_error(ArgumentError) + lambda { Friend.min(:age) }.should raise_error(NotImplementedError) + lambda { Friend.max(:age) }.should raise_error(NotImplementedError) + lambda { Friend.avg(:age) }.should raise_error(NotImplementedError) + lambda { Friend.sum(:age) }.should raise_error(NotImplementedError) end end end context "given a pre-existing v0 record" do