Sha256: 1c7501adde85c59a566fbe964a06b044685c5dafacab38473189a2b931d469bb
Contents?: true
Size: 634 Bytes
Versions: 1
Compression:
Stored size: 634 Bytes
Contents
require 'spec_helper' require 'fixtures/models' class MyOwnPermit < CanTango::Permit::Base include CanTango::Permit::Helper::Host end class RequestHost attr_accessor :host def initialize host @host = host end end describe CanTango::Permit::Helper::Naming do before do @localhost_req = RequestHost.new 'localhost' @user = SimpleUser.new @ability = CanTango::Ability::Base.new @user, :request => @localhost_req end subject { MyOwnPermit.new @ability } context 'localhost' do specify { subject.local_host?.should be_true } specify { subject.public_host?.should be_false } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cantango-permits-0.1.1 | spec/cantango/permit/helper/host_spec.rb |