Created
September 29, 2011 06:43
-
-
Save pzel/1250123 to your computer and use it in GitHub Desktop.
Capybara-webkit version (from 1056023)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
ENV['RACK_ENV'] = 'test' | |
require './nejiro' | |
require 'rspec' | |
require 'capybara' | |
require 'capybara/rspec' | |
require 'capybara-webkit' | |
RSpec.configure do |config| | |
config.before(:each) {DataMapper.auto_migrate!} | |
config.include Capybara | |
end | |
Capybara.javascript_driver = :webkit | |
Capybara.default_driver = :webkit | |
Capybara.app = Sinatra::Application.new | |
describe "Tag page" do | |
it "should check for ununsed tags upon hovering" do | |
visit "/tags" | |
fill_in "tag[content]", :with => "hyperbole" | |
click_button "Add tag" | |
tag = page.find('div.info_for_tag') | |
tag.trigger(:mouseover) | |
page.should have_selector("div.unused_tag") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment