Sha256: e3881c38e0f80a62d5b00bf7f465288d6704d5bc658c592fec4c41a74ed293a2

Contents?: true

Size: 349 Bytes

Versions: 9

Compression:

Stored size: 349 Bytes

Contents

require 'spec_helper'

describe Virtus::Attribute::DefaultValue::FromSymbol, '.handle?' do
  subject { described_class.handle?(default) }

  context 'with a symbol' do
    let(:default) { :method_name  }

    it { should be(true)  }
  end

  context 'with a non-symbol' do
    let(:default) { 'method_name' }

    it { should be(false)  }
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
virtus-0.5.5 spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb
virtus-0.5.4 spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb
virtus-0.5.3 spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/virtus-0.5.2/spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb
virtus-0.5.2 spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb
virtus-0.5.1 spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb
virtus-0.5.0 spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb
virtus-0.4.2 spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb
virtus-0.4.1 spec/unit/virtus/attribute/default_value/from_symbol/class_methods/handle_spec.rb