Permalink
Browse files

Add missing specs for Inflecto.inflections

  • Loading branch information...
1 parent d24f5c6 commit 901b96c6967a6170982cb40130e6693fc1957e47 @indrekj indrekj committed May 27, 2013
Showing with 21 additions and 0 deletions.
  1. +21 −0 spec/unit/inflecto/class_methods/inflections_spec.rb
@@ -0,0 +1,21 @@
+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 eq(Inflecto::Inflections.instance)
+ end
+ end
+
+ context 'when without block' do
+ subject { described_class.inflections }
+
+ it { should be(Inflecto::Inflections.instance) }
+ end
+end

0 comments on commit 901b96c

Please sign in to comment.