Sha256: ff2ab503894550b0b9093bb0056a1fa1e48beb3c8138a1de50fc060ddcc5f058

Contents?: true

Size: 640 Bytes

Versions: 11

Compression:

Stored size: 640 Bytes

Contents

require 'spec_helper'

class MyAccount
  def self.guest
    :guest_account
  end
end

class MyUser
  def self.guest
    :guest
  end
end

describe CanTango::Configuration::Guest do
  describe 'default settings with class methods for #guest defined' do
    before do
      CanTango.config.user.base_class = MyUser
      CanTango.config.user_account.base_class = MyAccount
    end

    subject { CanTango.config.guest }
      its(:default_user?)     { should be_true }
      its(:user)              { should == :guest }

      its(:default_account?)  { should be_true }
      its(:account)           { should == :guest_account }
  end
end



Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cantango-config-0.1.9.2 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.8.1 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.8 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.7 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.6 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.5 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.4 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.3 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.2 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.1 spec/cantango/configuration/guest/find_guest_default_way_spec.rb
cantango-config-0.1.0 spec/cantango/configuration/guest/find_guest_default_way_spec.rb