Sha256: e7196b40ccb35d0ab6b523efe176e2741078e1a54c79d33b0f763ce88296addb

Contents?: true

Size: 888 Bytes

Versions: 9

Compression:

Stored size: 888 Bytes

Contents

require 'spec_helper'

describe 'method call matcher with args' do      
  context "content with call devise" do  
    call = %{
        devise :database_authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable
    }
    it "should have call to hello" do            
      call.should have_call :devise, :args => [:confirmable, :trackable]
      call.should_not have_call :devise, :args => [:confirmable, :trackable_ids]      
    end
  end 

  context "content with call devise" do  
    call = %{
        devise :database_authenticatable, confirm_me, :recoverable, "hello"
    }
    it "should have call to hello" do            
      call.should have_call :devise, :args => ['#confirm_me', "hello"]
      call.should have_call :devise, :args => [['#confirm_me', "hello"]]
      call.should_not have_call :devise, :args => ['#hello']      
    end
  end 
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
code-spec-0.4.0 spec/code-spec/matchers/have_call_args.rb
code-spec-0.3.0 spec/code-spec/matchers/have_call_args.rb
code-spec-0.2.11 spec/code-spec/matchers/have_call_args.rb
code-spec-0.2.9 spec/code-spec/matchers/have_call_args.rb
code-spec-0.2.8 spec/code-spec/matchers/have_call_args.rb
code-spec-0.2.7 spec/code-spec/matchers/have_call_args.rb
code-spec-0.2.6 spec/code-spec/matchers/have_call_args.rb
code-spec-0.2.5 spec/code-spec/matchers/have_call_args.rb
code-spec-0.2.4 spec/code-spec/matchers/have_call_args.rb