aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile3
-rw-r--r--spec/controllers/refinery/blog/admin/comments_controller_spec.rb10
-rw-r--r--spec/controllers/refinery/blog/posts_controller_spec.rb2
-rw-r--r--spec/features/refinery/blog/admin/categories_spec.rb2
-rw-r--r--spec/features/refinery/blog/admin/comments_spec.rb2
-rw-r--r--spec/features/refinery/blog/admin/menu_spec.rb4
-rw-r--r--spec/features/refinery/blog/admin/posts_spec.rb4
-rw-r--r--spec/features/refinery/blog/categories_spec.rb2
-rw-r--r--spec/features/refinery/blog/posts_spec.rb2
-rw-r--r--spec/helpers/refinery/blog/controller_helper_spec.rb2
-rw-r--r--spec/helpers/refinery/blog/posts_helper_spec.rb2
-rw-r--r--spec/models/refinery/blog/category_spec.rb2
-rw-r--r--spec/models/refinery/blog/comment_spec.rb2
-rw-r--r--spec/models/refinery/blog/post_spec.rb10
-rw-r--r--spec/spec_helper.rb3
15 files changed, 26 insertions, 26 deletions
diff --git a/Gemfile b/Gemfile
index e1d2415..b26b44e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -12,7 +12,8 @@ gem 'mime-types', '1.25.1'
group :test do
gem 'refinerycms-testing', github: 'refinery/refinerycms'
- gem 'poltergeist'
+ gem 'pry'
+ gem 'launchy'
end
# Database Configuration
diff --git a/spec/controllers/refinery/blog/admin/comments_controller_spec.rb b/spec/controllers/refinery/blog/admin/comments_controller_spec.rb
index dc7aef8..9346ff5 100644
--- a/spec/controllers/refinery/blog/admin/comments_controller_spec.rb
+++ b/spec/controllers/refinery/blog/admin/comments_controller_spec.rb
@@ -3,12 +3,12 @@ require "spec_helper"
module Refinery
module Blog
module Admin
- describe CommentsController do
+ describe CommentsController, type: :controller do
refinery_login_with :refinery_user
describe "#index" do
let!(:comment) { FactoryGirl.create(:blog_comment) }
-
+
it "succeeds" do
get :index
response.should be_success
@@ -43,13 +43,13 @@ module Refinery
post :approve, :id => comment.id
response.should be_redirect
end
-
+
it "approves the comment" do
post :approve, :id => comment.id
Refinery::Blog::Comment.approved.count.should eq(1)
end
end
-
+
describe "#rejected" do
let!(:comment) { FactoryGirl.create(:rejected_comment) }
@@ -72,7 +72,7 @@ module Refinery
post :reject, :id => comment.id
response.should be_redirect
end
-
+
it "rejects the comment" do
post :reject, :id => comment.id
Refinery::Blog::Comment.rejected.count.should eq(1)
diff --git a/spec/controllers/refinery/blog/posts_controller_spec.rb b/spec/controllers/refinery/blog/posts_controller_spec.rb
index ee948a5..4b62d53 100644
--- a/spec/controllers/refinery/blog/posts_controller_spec.rb
+++ b/spec/controllers/refinery/blog/posts_controller_spec.rb
@@ -2,7 +2,7 @@ require "spec_helper"
module Refinery
module Blog
- describe PostsController do
+ describe PostsController, type: :controller do
before do
FactoryGirl.create(:blog_post, :title => "blogpost_one")
FactoryGirl.create(:blog_post, :title => "blogpost_two")
diff --git a/spec/features/refinery/blog/admin/categories_spec.rb b/spec/features/refinery/blog/admin/categories_spec.rb
index f3cdc5a..f322562 100644
--- a/spec/features/refinery/blog/admin/categories_spec.rb
+++ b/spec/features/refinery/blog/admin/categories_spec.rb
@@ -1,7 +1,7 @@
# encoding: utf-8
require 'spec_helper'
-describe "Categories admin" do
+describe "Categories admin", type: :feature do
refinery_login_with :refinery_user
let(:title) { "lol" }
diff --git a/spec/features/refinery/blog/admin/comments_spec.rb b/spec/features/refinery/blog/admin/comments_spec.rb
index 08fe9df..0eb5108 100644
--- a/spec/features/refinery/blog/admin/comments_spec.rb
+++ b/spec/features/refinery/blog/admin/comments_spec.rb
@@ -3,7 +3,7 @@ require "spec_helper"
module Refinery
module Blog
module Admin
- describe Comment do
+ describe Comment, type: :feature do
refinery_login_with :refinery_user
describe "#index" do
diff --git a/spec/features/refinery/blog/admin/menu_spec.rb b/spec/features/refinery/blog/admin/menu_spec.rb
index ba10ffe..3411c6c 100644
--- a/spec/features/refinery/blog/admin/menu_spec.rb
+++ b/spec/features/refinery/blog/admin/menu_spec.rb
@@ -1,8 +1,8 @@
require 'spec_helper'
-describe "Blog menu entry" do
+describe "Blog menu entry", type: :feature do
refinery_login_with :refinery_user
-
+
it "is highlighted when managing the blog" do
visit refinery.admin_root_path
diff --git a/spec/features/refinery/blog/admin/posts_spec.rb b/spec/features/refinery/blog/admin/posts_spec.rb
index 5dca929..2333ea0 100644
--- a/spec/features/refinery/blog/admin/posts_spec.rb
+++ b/spec/features/refinery/blog/admin/posts_spec.rb
@@ -4,7 +4,7 @@ require "spec_helper"
module Refinery
module Blog
module Admin
- describe Post do
+ describe Post, type: :feature do
refinery_login_with :refinery_user
let!(:blog_category) do
@@ -49,7 +49,7 @@ module Refinery
page.should have_css '.blog_categories'
page.should have_css "#post_category_ids_#{blog_category.id}"
check blog_category.title
- find_field("post_category_ids_#{blog_category.id}").should be_checked
+ find(:css, "#post_category_ids_#{blog_category.id}").checked?.should be_truthy
click_button "Save"
page.should have_content("was successfully added.")
end
diff --git a/spec/features/refinery/blog/categories_spec.rb b/spec/features/refinery/blog/categories_spec.rb
index 021dd94..efcf388 100644
--- a/spec/features/refinery/blog/categories_spec.rb
+++ b/spec/features/refinery/blog/categories_spec.rb
@@ -1,7 +1,7 @@
require "spec_helper"
module Refinery
- describe "BlogCategories" do
+ describe "BlogCategories", type: :feature do
refinery_login_with :refinery_user
context "has one category and post" do
diff --git a/spec/features/refinery/blog/posts_spec.rb b/spec/features/refinery/blog/posts_spec.rb
index 1fe56bc..daba07e 100644
--- a/spec/features/refinery/blog/posts_spec.rb
+++ b/spec/features/refinery/blog/posts_spec.rb
@@ -1,7 +1,7 @@
require "spec_helper"
module Refinery
- describe "Blog::Posts" do
+ describe "Blog::Posts", type: :feature do
refinery_login_with :refinery_user
context "when has blog posts" do
diff --git a/spec/helpers/refinery/blog/controller_helper_spec.rb b/spec/helpers/refinery/blog/controller_helper_spec.rb
index 732f2bd..b9aa6a7 100644
--- a/spec/helpers/refinery/blog/controller_helper_spec.rb
+++ b/spec/helpers/refinery/blog/controller_helper_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
module Refinery
module Blog
- describe ControllerHelper do
+ describe ControllerHelper, type: :helper do
describe "#find_tags" do
let(:tags) { helper.find_tags }
diff --git a/spec/helpers/refinery/blog/posts_helper_spec.rb b/spec/helpers/refinery/blog/posts_helper_spec.rb
index 7087bff..4a791d9 100644
--- a/spec/helpers/refinery/blog/posts_helper_spec.rb
+++ b/spec/helpers/refinery/blog/posts_helper_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
module Refinery
module Blog
describe PostsHelper do
- describe "#blog_archive_widget" do
+ describe "#blog_archive_widget", type: :helper do
let(:html) { helper.blog_archive_widget(dates) }
let(:links) { Capybara.string(html).find("#blog_archive_widget ul") }
diff --git a/spec/models/refinery/blog/category_spec.rb b/spec/models/refinery/blog/category_spec.rb
index 9cd5d97..0292991 100644
--- a/spec/models/refinery/blog/category_spec.rb
+++ b/spec/models/refinery/blog/category_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
module Refinery
module Blog
- describe Category do
+ describe Category, type: :model do
let(:category) { FactoryGirl.create(:blog_category) }
let(:refinery_user) { FactoryGirl.create(:refinery_user) }
diff --git a/spec/models/refinery/blog/comment_spec.rb b/spec/models/refinery/blog/comment_spec.rb
index 3a77100..7a35a59 100644
--- a/spec/models/refinery/blog/comment_spec.rb
+++ b/spec/models/refinery/blog/comment_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
module Refinery
module Blog
- describe Comment do
+ describe Comment, type: :model do
context "wiring up" do
let(:comment) { FactoryGirl.create(:blog_comment) }
diff --git a/spec/models/refinery/blog/post_spec.rb b/spec/models/refinery/blog/post_spec.rb
index 99946b8..73668e4 100644
--- a/spec/models/refinery/blog/post_spec.rb
+++ b/spec/models/refinery/blog/post_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
module Refinery
module Blog
- describe Post do
+ describe Post, type: :model do
let(:post) { FactoryGirl.create(:blog_post) }
describe "validations" do
@@ -159,7 +159,7 @@ module Refinery
end
it "should be true" do
- described_class.comments_allowed?.should be_true
+ described_class.comments_allowed?.should be_truthy
end
end
@@ -169,7 +169,7 @@ module Refinery
end
it "should be false" do
- described_class.comments_allowed?.should be_false
+ described_class.comments_allowed?.should be_falsey
end
end
end
@@ -187,7 +187,7 @@ module Refinery
end
it "should be true" do
- described_class.teasers_enabled?.should be_true
+ described_class.teasers_enabled?.should be_truthy
end
end
@@ -197,7 +197,7 @@ module Refinery
end
it "should be false" do
- described_class.teasers_enabled?.should be_false
+ described_class.teasers_enabled?.should be_falsey
end
end
end
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index bc10eff..4b29712 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -19,8 +19,7 @@ RSpec.configure do |config|
end
# set javascript driver for capybara
-require 'capybara/poltergeist'
-Capybara.javascript_driver = :poltergeist
+Capybara.javascript_driver = :selenium
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories including factories.