Sha256: 218556a7e39af193bbf8e7bcca1a62e6d66e23a285266159411779c4c3348a22
Contents?: true
Size: 620 Bytes
Versions: 2
Compression:
Stored size: 620 Bytes
Contents
describe "Submit Row" do before do row_settings = { title: "Submit", key: :submit, type: :submit, } @row = Formotion::Row.new(row_settings) @row.reuse_identifier = 'test' end it "should initialize with correct settings" do @row.object.class.should == Formotion::RowType::SubmitRow end it "should submit on select" do fake_delegate = FakeDelegateClass.new @row.object.on_select(nil, fake_delegate) fake_delegate.submit_called.should == true end end class FakeDelegateClass attr_accessor :submit_called def submit self.submit_called = true end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
formotion-0.5.1 | spec/row_type/submit_spec.rb |
formotion-0.5 | spec/row_type/submit_spec.rb |