Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (13 sloc) 0.395 kB
require 'spec_helper'
describe Virtus::Attribute::DefaultValue::FromCallable, '.handle?' do
subject { described_class.handle?(attribute, default) }
let(:attribute) { mock('attribute') }
context 'with a callable' do
let(:default) { Proc.new {} }
it { should be(true) }
end
context 'with a non-callable' do
let(:default) { '' }
it { should be(false) }
end
end
Jump to Line
Something went wrong with that request. Please try again.