Sha256: 769e8144c78e31b8418ce23c6c6e6eeeb355657696235cd5f61c645e971e2216
Contents?: true
Size: 726 Bytes
Versions: 2
Compression:
Stored size: 726 Bytes
Contents
require 'spec_helper' describe UnobtrusiveFlash::ControllerMixin do describe '#unobtrusive_flash_domain' do let(:controller_class) { Struct.new(:request) } before(:each) { controller_class.send(:include, UnobtrusiveFlash::ControllerMixin) } subject { controller_class.new( double('request', host: host) ) } context 'not on Heroku' do let(:host) { 'microsoft.com' } it 'should use :all' do expect(subject.send(:unobtrusive_flash_domain)).to eq(:all) end end context 'on Heroku' do let(:host) { 'myapp.herokuapp.com' } it 'should use the host' do expect(subject.send(:unobtrusive_flash_domain)).to eq('myapp.herokuapp.com') end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
unobtrusive_flash-3.2.0 | spec/domain_spec.rb |
unobtrusive_flash-3.1.0 | spec/domain_spec.rb |