configures capybara [#4]

This commit is contained in:
rgarcia
2015-07-15 23:19:14 +02:00
parent 421d62b1ad
commit 223eb06da2
7 changed files with 30 additions and 1 deletions

View File

@@ -42,5 +42,6 @@ group :development, :test do
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'rspec-rails', '~> 3.0'
gem 'capybara'
end

View File

@@ -42,6 +42,12 @@ GEM
builder (3.2.2)
byebug (5.0.0)
columnize (= 0.9.0)
capybara (2.4.4)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
@@ -154,12 +160,15 @@ GEM
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
byebug
capybara
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
jquery-rails

View File

@@ -0,0 +1,6 @@
class WelcomeController < ApplicationController
def index
end
end

View File

@@ -0,0 +1 @@
<h1>Bienvenido al Ayuntamiento de Madrid</h1>

View File

@@ -3,7 +3,7 @@ Rails.application.routes.draw do
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
# root 'welcome#index'
root 'welcome#index'
# Example of regular route:
# get 'products/:id' => 'catalog#view'

View File

@@ -0,0 +1,10 @@
require 'rails_helper'
feature "Home" do
scenario "Welcome message" do
visit '/'
expect(page).to have_content 'Bienvenido al Ayuntamiento de Madrid'
end
end

View File

@@ -4,6 +4,8 @@ abort("The Rails environment is running in production mode!") if Rails.env.produ
require 'spec_helper'
require 'rspec/rails'
require 'capybara/rails'
require 'capybara/rspec'
ActiveRecord::Migration.maintain_test_schema!
RSpec.configure do |config|