test/lib/troo/helpers/model_helpers_test.rb in troo-0.0.8 vs test/lib/troo/helpers/model_helpers_test.rb in troo-0.0.9
- old
+ new
@@ -69,35 +69,45 @@
end
describe '.default' do
subject { described_class.default }
- context 'when there is no default model' do
+ context 'when there is a default model' do
it 'returns the model' do
subject.must_equal(@dumber)
end
end
- context 'when there is a default model' do
+ context 'when there is no default model' do
before { @dumber.delete }
it { subject.must_equal(nil) }
end
end
+ describe '.default?' do
+ subject { described_class.default? }
+
+ context 'when there is a default model' do
+ it { subject.must_equal true }
+ end
+
+ context 'when there is no default model' do
+ before { @dumber.delete }
+
+ it { subject.must_equal false }
+ end
+ end
+
describe '.count' do
subject { described_class.count }
it 'returns the number of this model persisted' do
subject.must_equal(2)
end
end
- describe '#external_attributes' do
- subject { @dumb.external_attributes }
-
- it 'returns the attributes of the model which Trello affects' do
- subject.must_equal(name: 'My Dumb Model')
- end
+ describe '.retrieve' do
+ subject { described_class.retrieve(id, options) }
end
end
end