Permalink
Browse files

Converted Item view integration test from Cucumber to Rspec

  • Loading branch information...
1 parent 128e74d commit e952d4c77732ac36bee439042a7594d1af013b65 @hindman hindman committed May 22, 2012
Showing with 31 additions and 12 deletions.
  1. +0 −12 features/item_view.feature
  2. +30 −0 spec/integration/item_view_spec.rb
  3. +1 −0 spec/spec_helper.rb
@@ -1,12 +0,0 @@
-Feature: Item view
- I want the item show page to reflect Hydrus expectations
-
- Scenario: Item description is displayed
- When I am viewing item "druid:oo000oo0001"
- Then I should see "The story of Pinocchio"
- And I should see "oo000oo0001"
- And I should see "Publisher"
-
- Scenario: Default labels should be overridden
- When I am viewing "druid:oo000oo0001"
- Then I should not see "Download"
@@ -0,0 +1,30 @@
+require 'spec_helper'
+
+describe("Item view", :type => :request) do
+
+ before :each do
+ @druid = 'druid:oo000oo0001'
+ @hi = Hydrus::Item.find @druid
+ end
+
+ it "Some of the expected info is displayed" do
+ exp_items = [
+ "How Couples Meet and Stay Together",
+ "The story of Pinocchio",
+ @druid,
+ 'Contributing Author',
+ 'Frisbee, Hanna',
+ 'Sponsor',
+ 'US National Science Foundation, award SES-0751613',
+ 'wooden boys',
+ 'Related content:',
+ 'Online survey research site (really Project Gutenberg)',
+ 'pinocchio.htm',
+ ]
+ visit polymorphic_url(@hi)
+ exp_items.each do |exp|
+ page.should have_content(exp)
+ end
+ end
+
+end
View
@@ -6,6 +6,7 @@
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
+require 'capybara/rspec'
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.

0 comments on commit e952d4c

Please sign in to comment.