Sha256: 1e9a93fc6f5b63955a3ba2046176103f33d8cc4d97d9379951401b8d6501aba7

Contents?: true

Size: 687 Bytes

Versions: 4

Compression:

Stored size: 687 Bytes

Contents

def valid_signin(user)
	fill_in "inputEmail", :with => user.email
	fill_in "inputPassword", :with => user.password
 	click_button "signin-button"
end

RSpec::Matchers::define :have_title do |text|
  match do |page|
    Capybara.string(page.body).has_selector?('title', :text => text)
  end
end

def clean_uploads_folder
	FileUtils.rm_rf(Dir["#{Rails.root}/public/uploads/."])
end

RSpec::Matchers.define(:have_image) do |src|
  match { |node| node.has_selector? %(img[src="#{src}"]) }

  failure_message_for_should do
    "Expected an image with src #{src.inspect}"
  end

  failure_message_for_should_not do
    "Found image with src #{src.inspect}!"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
adminpanel-0.1.1 spec/support/helper_methods.rb
adminpanel-0.1.0cl.2 spec/support/helper_methods.rb
adminpanel-0.1.0cl spec/support/helper_methods.rb
adminpanel-0.1.0 spec/support/helper_methods.rb