Commit ec2c9f23 authored by Philip Arndt's avatar Philip Arndt
Browse files

Merge pull request #4 from refinery/update-ci-instructions

Updated Travis CI instructions and fixed specs
parents fc21c7c5 683a1f0e
Gemfile.lock Gemfile.lock
spec/dummy spec/dummy
.bundle .bundle
*.log
language: ruby language: ruby
before_install: cache: bundler
- 'if [[ "$TRAVIS_RUBY_VERSION" =~ "jruby" ]] ; then gem update --system ; fi' bundler_args: --without development
- gem install bundler
install:
- bundle install --without development
before_script: before_script:
- "bundle exec rake refinery:testing:dummy_app > /dev/null" - "sh -e /etc/init.d/xvfb start"
- "bundle exec rake refinery:testing:dummy_app"
script: script:
- bundle exec rspec spec - "DISPLAY=:99.0 bundle exec rspec spec"
env:
- DB=postgresql
- DB=mysql
notifications: notifications:
email: true email: true
irc: irc:
...@@ -15,20 +16,10 @@ notifications: ...@@ -15,20 +16,10 @@ notifications:
skip_join: true skip_join: true
channels: channels:
- "irc.freenode.org#refinerycms" - "irc.freenode.org#refinerycms"
campfire: webhooks:
on_success: always - https://webhooks.gitter.im/e/b5d48907cdc89864b874
on_failure: always
rooms:
- secure: "X5X39BTgXacSdc32F8mIjJKPqm5dZzmgZfJ14qYpJeMETTdA5JfByt2uCfU8\njJkkxT+XGWta0bSSlRIHQJO6pK26U94A95VYDX0jNuneKEnsoAsqJ6U0VY6v\nH5oxXMAZ2perP/FH9ZsPNR+ulyFfbMQCeGPJw5AXKZQqzf6qPOI="
env:
- DB=postgresql
- DB=mysql
matrix:
allow_failures:
- rvm: rbx-19mode
- rvm: jruby-19mode
rvm: rvm:
- 2.2
- 2.1
- 2.0.0 - 2.0.0
- 1.9.3 sudo: false
- rbx-19mode
- jruby-19mode
...@@ -2,16 +2,13 @@ source 'https://rubygems.org' ...@@ -2,16 +2,13 @@ source 'https://rubygems.org'
gemspec gemspec
git 'git://github.com/refinery/refinerycms.git', :branch => 'master' do git 'https://github.com/refinery/refinerycms', :branch => 'master' do
gem 'refinerycms' gem 'refinerycms'
group :development, :test do group :development, :test do
gem 'refinerycms-testing' gem 'refinerycms-testing'
end end
end end
gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: 'master'
gem 'mime-types', '~> 1.16'
gem 'protected_attributes'
# Database Configuration # Database Configuration
unless ENV['TRAVIS'] unless ENV['TRAVIS']
...@@ -35,6 +32,8 @@ end ...@@ -35,6 +32,8 @@ end
group :test do group :test do
gem 'launchy' gem 'launchy'
gem 'pry'
gem 'poltergeist'
end end
# Refinery/rails should pull in the proper versions of these # Refinery/rails should pull in the proper versions of these
......
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
ENGINE_PATH = File.expand_path('../..', __FILE__)
load File.expand_path('../../spec/dummy/bin/rails', __FILE__)
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rake' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require 'rubygems'
require 'bundler/setup'
load Gem.bin_path('rake', 'rake')
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rspec' is installed as part of a gem, and
# this file is here to facilitate running it.
#
begin
if Dir.exist?(File.expand_path('../../spec/dummy', __FILE__))
load File.expand_path("../spring", __FILE__)
end
rescue LoadError
end
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require 'rubygems'
require 'bundler/setup'
load Gem.bin_path('rspec-core', 'rspec')
#!/usr/bin/env ruby
# This file loads spring without using Bundler, in order to be fast
# It gets overwritten when you run the `spring binstub` command
unless defined?(Spring)
require "rubygems"
require "bundler"
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
ENV["GEM_HOME"] = ""
Gem.paths = ENV
gem "spring", match[1]
require "spring/binstub"
end
end
require "spec_helper" require "spec_helper"
module Refinery module Refinery
describe "search" do describe "search", :type => :feature do
refinery_login_with :refinery_user refinery_login_with :refinery_user
shared_examples "no result search" do shared_examples "no result search" do
it "returns no results" do it "returns no results" do
fill_in "search", :with => "yada yada" fill_in "search", :with => "yada yada"
click_button "Search" click_button "Search"
page.should have_content("Sorry, no results found") expect(page).to have_content("Sorry, no results found")
end end
end end
...@@ -23,7 +23,7 @@ module Refinery ...@@ -23,7 +23,7 @@ module Refinery
click_button "Search" click_button "Search"
within ".actions" do within ".actions" do
page.should have_selector("a[href$='#{image.image_name}']") expect(page).to have_selector("a[href*='#{image.image_name}']")
end end
end end
...@@ -39,7 +39,7 @@ module Refinery ...@@ -39,7 +39,7 @@ module Refinery
it "returns found resource" do it "returns found resource" do
fill_in "search", :with => "refinery" fill_in "search", :with => "refinery"
click_button "Search" click_button "Search"
page.should have_content("Refinery Is Awesome.txt") expect(page).to have_content("Refinery Is Awesome.txt")
end end
it_behaves_like "no result search" it_behaves_like "no result search"
...@@ -54,7 +54,7 @@ module Refinery ...@@ -54,7 +54,7 @@ module Refinery
it "returns found page" do it "returns found page" do
fill_in "search", :with => "ugis" fill_in "search", :with => "ugis"
click_button "Search" click_button "Search"
page.should have_content("Ugis Ozols") expect(page).to have_content("Ugis Ozols")
end end
it_behaves_like "no result search" it_behaves_like "no result search"
...@@ -69,7 +69,7 @@ module Refinery ...@@ -69,7 +69,7 @@ module Refinery
it "returns found user" do it "returns found user" do
fill_in "search", :with => "ugis" fill_in "search", :with => "ugis"
click_button "Search" click_button "Search"
page.should have_content("ugis") expect(page).to have_content("ugis")
end end
it_behaves_like "no result search" it_behaves_like "no result search"
......
require 'spec_helper' require 'spec_helper'
module Refinery module Refinery
describe Page do describe Page, :type => :model do
let(:page_title) { 'RSpec is great for testing too' } let(:page_title) { 'RSpec is great for testing too' }
let(:page) { subject.class.new(:title => page_title, :deletable => true)} let(:page) { subject.class.new(:title => page_title, :deletable => true)}
...@@ -11,7 +11,7 @@ module Refinery ...@@ -11,7 +11,7 @@ module Refinery
end end
it 'returns all page part content' do it 'returns all page part content' do
page.all_page_part_content.should == "<p>I'm the first page part for this page.</p> <p>Closely followed by the second page part.</p>" expect(page.all_page_part_content).to eq "<p>I'm the first page part for this page.</p> <p>Closely followed by the second page part.</p>"
end end
end end
end end
...@@ -12,13 +12,13 @@ Rails.backtrace_cleaner.remove_silencers! ...@@ -12,13 +12,13 @@ Rails.backtrace_cleaner.remove_silencers!
RSpec.configure do |config| RSpec.configure do |config|
config.mock_with :rspec config.mock_with :rspec
config.treat_symbols_as_metadata_keys_with_true_values = true
config.filter_run :focus => true config.filter_run :focus => true
config.run_all_when_everything_filtered = true config.run_all_when_everything_filtered = true
end end
# set javascript driver for capybara # set javascript driver for capybara
Capybara.javascript_driver = :selenium require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
# Requires supporting files with custom matchers and macros, etc, # Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories including factories. # in ./support/ and its subdirectories including factories.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment