Sha256: 8391088eaa73adf6ade21e3cc65028b1d203f40b5d49fc3fa71ba090af282f14
Contents?: true
Size: 1.12 KB
Versions: 54
Compression:
Stored size: 1.12 KB
Contents
require File.dirname(__FILE__) + '/../integration_helper' describe 'Complex with_scope conditions' do include Rack::Test::Methods def app run_server end it 'returns the right number of events' do get '/filtered' expect(last_response.body).to include 'events=1' end it 'returns the right number of bands' do get '/filtered' expect(last_response.body).to include 'bands=2' end it 'returns the first band in the right order' do get '/filtered' expect(last_response.body).to include "first event=Browne's Market" end it 'returns the right number of events' do get '/filtered' expect(last_response.body).to include 'events=1' end it 'evaluates collection when called all inside of scope' do get '/music' expect(last_response.body).to include "<p class='scoped_song'>Song #3" expect(last_response.body).to match /<p class='scoped_song_link'>\s+<a href='\/songs\/song-number-3'>Song #3<\/a>/m end it 'size of evaluated unscoped collection equal to unevaluated one' do get '/music' expect(last_response.body).to include "class='collection_equality'>8=8" end end
Version data entries
54 entries across 54 versions & 1 rubygems