Commit 683a1f0e authored by Philip Arndt's avatar Philip Arndt
Browse files

Added binstubs and fix specs

parent c869af06
Gemfile.lock
spec/dummy
.bundle
*.log
......@@ -2,7 +2,7 @@ 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
......@@ -32,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