spec/concerned_spec.rb in concerned-0.1.1 vs spec/concerned_spec.rb in concerned-0.1.2

- old
+ new

@@ -5,20 +5,27 @@ # The same procedure as one that needed for common #require - It should know path. $:.unshift File.dirname __FILE__ class FixtureUser + include Concerned + concerned_with :scopes, :validations shared_concerns :associations include_shared_concerns :caching + include_concerns :validations end describe "Concerned" do describe "#concerned_with" do it 'should require files from #{name.underscore}/#{concern}' do [:scopes, :validations].each do |concern| FixtureUser.new.should respond_to("method_from_#{concern}_concern") end + + FixtureUser.my_concerns.should include(:validations) + FixtureUser.my_shared_concerns.should include(:caching) + FixtureUser.all_my_concerns.should include(:caching, :validations) end end describe "#include_shared_concerns" do it 'should require and include from shared/#{concern}' do