Sha256: c7a8ce0d9a924118776bf41d42e930e19ca340de640eb4549d765e83fdb8a879
Contents?: true
Size: 697 Bytes
Versions: 2
Compression:
Stored size: 697 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe 'module matcher' do context "content without class Hello" do no_class = %q{ module Hello def hello end end} it "should not have class Hello" do no_class.should_not have_class :Hello do |content| puts content end end end context "content with class Hello" do with_class = %q{ class Hello def hello end end} it "should have class Hello" do with_class.should have_class :Hello do |content| puts content end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
generator-spec-0.5.0 | spec/generator_spec/matchers/content/have_class_spec.rb |
generator-spec-0.4.8 | spec/generator_spec/matchers/content/have_class_spec.rb |