contact_us 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b4af9a7e1a040a09d56fb900c45a423271c1b3c
4
- data.tar.gz: 9c1da5313dacabbe5504d188102081854492ef34
3
+ metadata.gz: 8ec0fa58f0c1f02fd8057e114737f22559cf3e37
4
+ data.tar.gz: e057a8b3e3f293790212e9cad6c3532a4bf4cec4
5
5
  SHA512:
6
- metadata.gz: e80d5d953abe298c375c08ea8f383e86786b4aab675237d284dbea293a0db518e831127d561a2f77835e53ea381ae984242b1b35798a2b6f7abae65262359ae4
7
- data.tar.gz: 12087ba06b082c2ef0216d64e881aaf2dd18185a0aa9ddad6a2ed7dd81ad46d3502cfa17e342b4c860b05a01848295709ef8da5e6cda5080112f2397fb6b0560
6
+ metadata.gz: e8fdf4da521c0d2df8b0077b2fad010ff1df55e64d1abec819c8babdc497d335c85399d7dd2468eead7cacf423991062e99b4121a7b24a7512817eee20e90cd1
7
+ data.tar.gz: 7c20170c0a29cce28e0046a4e7d4bcc9036ecfff4641895d7c955cbfeb4da2b193243525f3717b44a12479a0126ccd6150842dc004e26d6eaf6a1b53e4841503
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## ContactUs 0.5.3 (Jun 22nd 2014)
2
+
3
+ * Updated line specs to Rspec 3 expect syntax.
4
+
1
5
  ## ContactUs 0.5.1 (Nov 19th 2013)
2
6
 
3
7
  * Require Rails >= 4 going forward. [Jeff Dutil]
@@ -1,3 +1,3 @@
1
1
  module ContactUs
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe 'Contact Us page' do
3
+ describe 'Contact Us page', :type => :feature do
4
4
 
5
5
  after do
6
6
  ActionMailer::Base.deliveries = []
@@ -18,11 +18,11 @@ describe 'Contact Us page' do
18
18
  it 'displays default contact form properly' do
19
19
  visit contact_us_path
20
20
  within "form#new_contact_us_contact" do
21
- page.should have_selector "input#contact_us_contact_email"
22
- page.should have_selector "textarea#contact_us_contact_message"
23
- page.should_not have_selector "input#contact_us_contact_name"
24
- page.should_not have_selector "input#contact_us_contact_subject"
25
- page.should have_selector "input.submit"
21
+ expect(page).to have_selector "input#contact_us_contact_email"
22
+ expect(page).to have_selector "textarea#contact_us_contact_message"
23
+ expect(page).not_to have_selector "input#contact_us_contact_name"
24
+ expect(page).not_to have_selector "input#contact_us_contact_subject"
25
+ expect(page).to have_selector "input.submit"
26
26
  end
27
27
  end
28
28
 
@@ -40,18 +40,18 @@ describe 'Contact Us page' do
40
40
  end
41
41
 
42
42
  it "I should be redirected to the homepage" do
43
- current_path.should == "/"
43
+ expect(current_path).to eq("/")
44
44
  end
45
45
 
46
46
  it "An email should have been sent" do
47
- ActionMailer::Base.deliveries.size.should == 1
47
+ expect(ActionMailer::Base.deliveries.size).to eq(1)
48
48
  end
49
49
 
50
50
  it "The email should have the correct attributes" do
51
51
  mail = ActionMailer::Base.deliveries.last
52
- mail.to.should == ['test@test.com']
53
- mail.from.should == ['test@example.com']
54
- mail.body.should match 'howdy'
52
+ expect(mail.to).to eq(['test@test.com'])
53
+ expect(mail.from).to eq(['test@example.com'])
54
+ expect(mail.body).to match 'howdy'
55
55
  end
56
56
  end
57
57
 
@@ -65,15 +65,15 @@ describe 'Contact Us page' do
65
65
 
66
66
  it "I should see two error messages" do
67
67
  within '#contact_us_contact_email_input' do
68
- page.should have_content "is invalid"
68
+ expect(page).to have_content "is invalid"
69
69
  end
70
70
  within '#contact_us_contact_message_input' do
71
- page.should have_content "can't be blank"
71
+ expect(page).to have_content "can't be blank"
72
72
  end
73
73
  end
74
74
 
75
75
  it "An email should not have been sent" do
76
- ActionMailer::Base.deliveries.size.should == 0
76
+ expect(ActionMailer::Base.deliveries.size).to eq(0)
77
77
  end
78
78
  end
79
79
  end
@@ -88,8 +88,8 @@ describe 'Contact Us page' do
88
88
  end
89
89
 
90
90
  it "displays an input for name and subject" do
91
- page.should have_selector "input#contact_us_contact_name"
92
- page.should have_selector "input#contact_us_contact_subject"
91
+ expect(page).to have_selector "input#contact_us_contact_name"
92
+ expect(page).to have_selector "input#contact_us_contact_subject"
93
93
  end
94
94
 
95
95
  context "Submitting the form" do
@@ -103,20 +103,20 @@ describe 'Contact Us page' do
103
103
  end
104
104
 
105
105
  it "I should be redirected to the homepage" do
106
- current_path.should == "/"
106
+ expect(current_path).to eq("/")
107
107
  end
108
108
 
109
109
  it "An email should have been sent" do
110
- ActionMailer::Base.deliveries.size.should == 1
110
+ expect(ActionMailer::Base.deliveries.size).to eq(1)
111
111
  end
112
112
 
113
113
  it "The email should have the correct attributes" do
114
114
  mail = ActionMailer::Base.deliveries.last
115
- mail.body.should match 'howdy'
116
- mail.body.should match 'Jeff'
117
- mail.from.should == ['test@example.com']
118
- mail.subject.should match 'Testing contact form.'
119
- mail.to.should == ['test@test.com']
115
+ expect(mail.body).to match 'howdy'
116
+ expect(mail.body).to match 'Jeff'
117
+ expect(mail.from).to eq(['test@example.com'])
118
+ expect(mail.subject).to match 'Testing contact form.'
119
+ expect(mail.to).to eq(['test@test.com'])
120
120
  end
121
121
  end
122
122
 
@@ -127,15 +127,15 @@ describe 'Contact Us page' do
127
127
 
128
128
  it "I should see error messages" do
129
129
  within '#contact_us_contact_name_input' do
130
- page.should have_content "can't be blank"
130
+ expect(page).to have_content "can't be blank"
131
131
  end
132
132
  within '#contact_us_contact_subject_input' do
133
- page.should have_content "can't be blank"
133
+ expect(page).to have_content "can't be blank"
134
134
  end
135
135
  end
136
136
 
137
137
  it "An email should not have been sent" do
138
- ActionMailer::Base.deliveries.size.should == 0
138
+ expect(ActionMailer::Base.deliveries.size).to eq(0)
139
139
  end
140
140
  end
141
141
  end
data/spec/spec_helper.rb CHANGED
@@ -41,4 +41,5 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
41
41
 
42
42
  RSpec.configure do |config|
43
43
  config.include RSpec::Matchers
44
+ config.infer_spec_type_from_file_location!
44
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contact_us
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Dutil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-26 00:00:00.000000000 Z
11
+ date: 2014-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -269,4 +269,3 @@ test_files:
269
269
  - spec/models/contact_us/contact_spec.rb
270
270
  - spec/spec_helper.rb
271
271
  - spec/support/active_model_lint.rb
272
- has_rdoc: