22 lines
450 B
Ruby
22 lines
450 B
Ruby
require 'spec_helper'
|
|
|
|
describe Inflecto, '.inflections' do
|
|
context 'when block given' do
|
|
it 'yields inflections instance' do
|
|
yielded = nil
|
|
|
|
described_class.inflections do |inflect|
|
|
yielded = inflect
|
|
end
|
|
|
|
yielded.should be(Inflecto::Inflections.instance)
|
|
end
|
|
end
|
|
|
|
context 'when without block' do
|
|
subject { described_class.inflections }
|
|
|
|
it { should be(Inflecto::Inflections.instance) }
|
|
end
|
|
end
|