spec/thinking_sphinx/scopes_spec.rb in thinking-sphinx-3.2.0 vs spec/thinking_sphinx/scopes_spec.rb in thinking-sphinx-3.3.0

- old
+ new

@@ -15,31 +15,31 @@ before :each do model.sphinx_scopes[:foo] = Proc.new { {:with => {:foo => :bar}} } end it "creates new search" do - model.foo.class.should == ThinkingSphinx::Search + expect(model.foo.class).to eq(ThinkingSphinx::Search) end it "passes block result to constructor" do - model.foo.options[:with].should == {:foo => :bar} + expect(model.foo.options[:with]).to eq({:foo => :bar}) end it "passes non-scopes through to the standard method error call" do - lambda { model.bar }.should raise_error(NoMethodError) + expect { model.bar }.to raise_error(NoMethodError) end end describe '#sphinx_scope' do it "saves the given block with a name" do model.sphinx_scope(:foo) { 27 } - model.sphinx_scopes[:foo].call.should == 27 + expect(model.sphinx_scopes[:foo].call).to eq(27) end end describe '#default_sphinx_scope' do it "gets and sets the default scope depending on the argument" do model.default_sphinx_scope :foo - model.default_sphinx_scope.should == :foo + expect(model.default_sphinx_scope).to eq(:foo) end end end