totem3
10/17/2013 - 11:26 PM

capybaraでphpテスト!

capybaraでphpテスト!

source 'https://rubygems.org'

gem 'rspec'
gem 'capybara'
gem 'capybara-mechanize'
gem 'launchy'
# coding: utf-8
require 'spec_helper'

describe "hoge" do
  before do
    visit '/'
  end

  it "hogehoge" do
    page.should have_content 'hoge'
  end
end
  

require 'capybara/rspec'
require 'capybara/mechanize'

Capybara.configure do |config|
  config.app = "fake"
  config.default_driver = :mechanize
  config.app_host       = 'your app host'
end

RSpec.configure do |config|
  config.include Capybara::DSL
end