spec/unit/operator/relational/test_group.rb in alf-0.9.3 vs spec/unit/operator/relational/test_group.rb in alf-0.10.0

- old
+ new

@@ -11,21 +11,21 @@ {:a => "via_method", :time => 2, :b => "b"}, {:a => "via_reader", :time => 3, :b => "b"}, ]} let(:expected) {[ - {:a => "via_method", :as => rel({:time => 1, :b => "b"}, - {:time => 2, :b => "b"})}, - {:a => "via_reader", :as => rel({:time => 3, :b => "b"})}, + {:a => "via_method", :as => Alf::Relation[{:time => 1, :b => "b"}, + {:time => 2, :b => "b"}]}, + {:a => "via_reader", :as => Alf::Relation[{:time => 3, :b => "b"}]}, ]} subject{ operator.to_a.sort{|k1,k2| k1[:a] <=> k2[:a]} } describe "without --allbut" do describe "when factored with commandline args" do - let(:operator){ Group.run(["--", "time", "b", "as"]) } + let(:operator){ Group.run(["--", "time", "b", "--", "as"]) } before{ operator.pipe(input) } it { should == expected } end describe "when factored with Lispy" do @@ -36,20 +36,20 @@ end describe "with --allbut" do describe "when factored with commandline args" do - let(:operator){ Group.run(["--","a", "as"]) } - before{ operator.allbut = true; operator.pipe(input) } + let(:operator){ Group.run(["--allbut", "--","a", "--", "as"]) } + before{ operator.pipe(input) } it { should == expected } end describe "when factored with Lispy" do - let(:operator){ Lispy.group(input, [:a], :as, true) } + let(:operator){ Lispy.group(input, [:a], :as, :allbut => true) } it { should == expected } end end end end -end \ No newline at end of file +end