Sha256: b777c5513fac371f0f7028c0a7f022e79863511125b8edc8b9bbb115aaac3a0d

Contents?: true

Size: 670 Bytes

Versions: 2

Compression:

Stored size: 670 Bytes

Contents

require 'test_helper'

module Sketchily
  describe Sketchily do
    before do
      setup_lib_spec
      @view = ActionView::Base.new
      @view.form_for(@drawing) do |f|
        @form_builder = f
      end
    end

    it 'must add methods to ActionView::Helpers::FormBuilder and ActionView::Base' do
      @form_builder.must_respond_to :sketchily
      @view.must_respond_to :sketchily
    end
    
    it 'must show sketchily' do
      sketchily = @form_builder.sketchily('svg')
      sketchily.wont_be_nil
      sketchily.wont_be_empty

      sketchily = @view.sketchily('drawing', 'svg')
      sketchily.wont_be_nil
      sketchily.wont_be_empty
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sketchily-4.0.1 spec/lib/sketchily/sketchily_spec.rb~
sketchily-4.0.0 spec/lib/sketchily/sketchily_spec.rb~