Sha256: c873f30b436ad4a1d4d06c4d1af5accd46fcc6c6256aa291c462b70a25ac2367
Contents?: true
Size: 1.44 KB
Versions: 15
Compression:
Stored size: 1.44 KB
Contents
require 'spec_helper' describe 'block matcher' do context "content without block" do not_class_self = %q{ def hello end} it "should not have block" do not_class_self.should_not have_block :hello end end context "content with block: hello do" do content = %q{ hello do blip end # do} it "should have block" do content.should have_block :hello end end context "content with block: hello :angel do" do content = %q{ hello :angel do blip end # do} it "should have block" do content.should have_block :hello, :args => ':angel' end end context "content with block: hello :angel do |x,y|" do content = %q{ hello :angel do |x,y| blip end # do} it "should have block" do content.should have_block :hello, :args => ':angel', :block_args => 'x,y' do |block| block.form.should_not be_nil end end end context "content with block: hello :angel do |x,y|" do content = %q{ form_for :person do |my_form| my_form.input :name end # do} it "should have my_form input called :name" do content.should have_block :form_for, :args => ':person' do |form_block| form_block.should have_form_call :input, :args => ':name' end end end end
Version data entries
15 entries across 15 versions & 1 rubygems