Sha256: 265f2742b37c41657f3d50dc6528aa14458ff6a1b5591165becd817b1eb015f7

Contents?: true

Size: 619 Bytes

Versions: 4

Compression:

Stored size: 619 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

%w(form_for fields_for form_remote_for remote_form_for).each do |action|

  describe action do 
    include RSpec::Rails::HelperExampleGroup
    
    it "should be accessible to rails apps by default" do 
      ActionView::Base.new.methods.should include("re_#{action}")
    end
    
    it "should set the builder to the RulesEngineView::FormBuilder" do
      options = {}
      helper.should_receive(action.to_sym).with("Name", {:builder => RulesEngineView::FormBuilder})
      helper.send("re_#{action}", "Name", options)
    end
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rules_engine-0.3.3 spec/lib/rules_engine_view/form_builder_spec.rb
rules_engine-0.3.2 spec/lib/rules_engine_view/form_builder_spec.rb
rules_engine-0.3.1 spec/lib/rules_engine_view/form_builder_spec.rb
rules_engine-0.3.0 spec/lib/rules_engine_view/form_builder_spec.rb