Sha256: d663ff82b564a8980384a518f69ae3ddab317a077012cf8260ebad7d0939823a

Contents?: true

Size: 624 Bytes

Versions: 16

Compression:

Stored size: 624 Bytes

Contents

module Gaku::Testing::FlashHelpers

  def flash?(text)
    page.should have_selector('#notice', text: text)
  end

  def flash_created?
    flash? 'successfully created'
  end

  def flash_updated?
    flash? 'successfully updated'
  end

  def flash_destroyed?
    flash? 'successfully destroyed'
  end

  def flash_recovered?
    flash? 'successfully recovered'
  end

  def flash_uploaded?
    flash? 'successfully uploaded'
  end

  def flash_error_for(field)
    page.should have_selector("div.#{field}formError")
  end

end

RSpec.configure do |config|
  config.include Gaku::Testing::FlashHelpers, type: :feature
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
gaku_testing-0.3.0 lib/gaku/testing/flash_helpers.rb
gaku_testing-0.3.0.pre.4 lib/gaku/testing/flash_helpers.rb
gaku_testing-0.3.0.pre.3 lib/gaku/testing/flash_helpers.rb
gaku_testing-0.3.0.pre.2 lib/gaku/testing/flash_helpers.rb
gaku_testing-0.3.0.pre.1 lib/gaku/testing/flash_helpers.rb
gaku_testing-0.3.0.pre.0 lib/gaku/testing/flash_helpers.rb
gaku-0.2.4 testing/lib/gaku/testing/flash_helpers.rb
gaku_testing-0.2.4 lib/gaku/testing/flash_helpers.rb
gaku-0.2.3 testing/lib/gaku/testing/flash_helpers.rb
gaku_testing-0.2.3 lib/gaku/testing/flash_helpers.rb
gaku-0.2.2 testing/lib/gaku/testing/flash_helpers.rb
gaku_testing-0.2.2 lib/gaku/testing/flash_helpers.rb
gaku-0.2.1 testing/lib/gaku/testing/flash_helpers.rb
gaku_testing-0.2.1 lib/gaku/testing/flash_helpers.rb
gaku-0.2.0 testing/lib/gaku/testing/flash_helpers.rb
gaku_testing-0.2.0 lib/gaku/testing/flash_helpers.rb