scheduled upgrade maintenance

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
spec/dummy
.bundle
*.log
language: ruby
before_install:
- 'if [[ "$TRAVIS_RUBY_VERSION" =~ "jruby" ]] ; then gem update --system ; fi'
- gem install bundler
install:
- bundle install --without development
cache: bundler
bundler_args: --without development
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:
- bundle exec rspec spec
- "DISPLAY=:99.0 bundle exec rspec spec"
env:
- DB=postgresql
- DB=mysql
notifications:
email: true
irc:
......@@ -15,20 +16,10 @@ notifications:
skip_join: true
channels:
- "irc.freenode.org#refinerycms"
campfire:
on_success: always
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
webhooks:
- https://webhooks.gitter.im/e/b5d48907cdc89864b874
rvm:
- 2.2
- 2.1
- 2.0.0
- 1.9.3
- rbx-19mode
- jruby-19mode
sudo: false
......@@ -2,16 +2,13 @@ source 'https://rubygems.org'
gemspec
git 'git://github.com/refinery/refinerycms.git', :branch => 'master' do
git 'https://github.com/refinery/refinerycms', :branch => 'master' do
gem 'refinerycms'
group :development, :test do
gem 'refinerycms-testing'
end
end
gem 'refinerycms-i18n', github: 'refinery/refinerycms-i18n', branch: 'master'
gem 'mime-types', '~> 1.16'
gem 'protected_attributes'
# Database Configuration
unless ENV['TRAVIS']
......@@ -35,6 +32,8 @@ end
group :test do
gem 'launchy'
gem 'pry'
gem 'poltergeist'
end
# 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"
module Refinery
describe "search" do
describe "search", :type => :feature do
refinery_login_with :refinery_user
shared_examples "no result search" do
it "returns no results" do
fill_in "search", :with => "yada yada"
click_button "Search"
page.should have_content("Sorry, no results found")
expect(page).to have_content("Sorry, no results found")
end
end
......@@ -23,7 +23,7 @@ module Refinery
click_button "Search"
within ".actions" do
page.should have_selector("a[href$='#{image.image_name}']")
expect(page).to have_selector("a[href*='#{image.image_name}']")
end
end
......@@ -39,7 +39,7 @@ module Refinery
it "returns found resource" do
fill_in "search", :with => "refinery"
click_button "Search"
page.should have_content("Refinery Is Awesome.txt")
expect(page).to have_content("Refinery Is Awesome.txt")
end
it_behaves_like "no result search"
......@@ -54,7 +54,7 @@ module Refinery
it "returns found page" do
fill_in "search", :with => "ugis"
click_button "Search"
page.should have_content("Ugis Ozols")
expect(page).to have_content("Ugis Ozols")
end
it_behaves_like "no result search"
......@@ -69,7 +69,7 @@ module Refinery
it "returns found user" do
fill_in "search", :with => "ugis"
click_button "Search"
page.should have_content("ugis")
expect(page).to have_content("ugis")
end
it_behaves_like "no result search"
......
require 'spec_helper'
module Refinery
describe Page do
describe Page, :type => :model do
let(:page_title) { 'RSpec is great for testing too' }
let(:page) { subject.class.new(:title => page_title, :deletable => true)}
......@@ -11,7 +11,7 @@ module Refinery
end
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
......@@ -12,13 +12,13 @@ Rails.backtrace_cleaner.remove_silencers!
RSpec.configure do |config|
config.mock_with :rspec
config.treat_symbols_as_metadata_keys_with_true_values = true
config.filter_run :focus => true
config.run_all_when_everything_filtered = true
end
# 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,
# in ./support/ and its subdirectories including factories.
......
Markdown is supported
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