Skip to content

Commit

Permalink
Added tests for :respond_to? and :send
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaldrip committed Dec 5, 2012
1 parent 62c3ae0 commit 4ae9169
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sunspot/spec/api/search/paginated_collection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@

it { subject.should be_an(Array) }

it 'should allow send' do
subject.send(:current_page).should eql(1)
describe "#send" do
it 'should allow send' do
expect { subject.send(:current_page) }.not_to raise_error(NoMethodError)
end
end

describe "#respond_to?" do
it 'should return true for current_page' do
subject.respond_to?(:current_page).should be_true
end
end

context "behaves like a WillPaginate::Collection" do
Expand Down

0 comments on commit 4ae9169

Please sign in to comment.