Sha256: 60f3a9a6880264bfa7a541cddbc425cc758820bf48aa64256a5b0e6d68f8534a

Contents?: true

Size: 734 Bytes

Versions: 23

Compression:

Stored size: 734 Bytes

Contents

require 'spec_helper'
require_relative '../../../app/helpers/riveter/command_form_helper'

describe Riveter::CommandFormHelper do
  subject {
    Class.new().tap do |klass|
      klass.send :include, Riveter::CommandFormHelper
    end.new()
  }

  describe "#command_form_for" do
    it "delegates to default form_for" do
      command = TestCommand.new()
      expect(subject).to receive(:form_for).with(command, :as => 'test', :url => 'test')

      subject.command_form_for(command)
    end

    it "delegates to simple form if available" do
      command = TestCommand.new()
      expect(subject).to receive(:simple_form_for).with(command, :as => 'test', :url => 'test')

      subject.command_form_for(command)
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
riveter-0.8.3 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.8.2 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.8.1 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.8.0 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.7.0 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.6.0 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.3.0 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.2.1 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.2.0 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.1.1 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.15 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.14 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.13 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.12 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.11 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.10 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.9 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.8 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.7 spec/helpers/riveter/command_form_helper_spec.rb
riveter-0.0.6 spec/helpers/riveter/command_form_helper_spec.rb