Sha256: f398fd665fc87a5f0c5e4ca59d4eeba12f7e49fa217d12467f05da34869f9ba1

Contents?: true

Size: 661 Bytes

Versions: 12

Compression:

Stored size: 661 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

12 entries across 12 versions & 1 rubygems

Version Path
adminpanel-1.2.9 spec/support/helper_methods.rb
adminpanel-1.2.8 spec/support/helper_methods.rb
adminpanel-1.2.7 spec/support/helper_methods.rb
adminpanel-1.2.6 spec/support/helper_methods.rb
adminpanel-1.2.5 spec/support/helper_methods.rb
adminpanel-1.2.4 spec/support/helper_methods.rb
adminpanel-1.2.3 spec/support/helper_methods.rb
adminpanel-1.2.2 spec/support/helper_methods.rb
adminpanel-1.2.1 spec/support/helper_methods.rb
adminpanel-1.2.0 spec/support/helper_methods.rb
adminpanel-1.1.0 spec/support/helper_methods.rb
adminpanel-1.0.0 spec/support/helper_methods.rb