Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Clean up WebHook specs.

  • Loading branch information...
commit c41819587f6e7d40871118d1bceebb97ea99ab94 1 parent 28211ff
Tyler Hunt authored November 12, 2012

Showing 1 changed file with 16 additions and 6 deletions. Show diff stats Hide diff stats

  1. 22  spec/brewery_db/web_hook_spec.rb
22  spec/brewery_db/web_hook_spec.rb
@@ -2,7 +2,6 @@
2 2
 require 'brewery_db/web_hook'
3 3
 
4 4
 describe BreweryDB::WebHook do
5  
-  subject(:web_hook) { described_class.new(brewery_db_payload) }
6 5
   let(:action) { 'edit' }
7 6
   let(:attribute) { 'beer' }
8 7
   let(:attribute_id) { 'x6bRxw' }
@@ -10,9 +9,20 @@
10 9
   let(:nonce) { '576a8003ab8936d99fb104401141d613' }
11 10
   let(:sub_action) { 'none' }
12 11
   let(:timestamp) { '1350573527' }
13  
-  let(:brewery_db_payload) { { key: key, nonce: nonce, attribute: attribute,
14  
-                               attributeId: attribute_id, action: action,
15  
-                               subAction: sub_action, timestamp: timestamp } }
  12
+
  13
+  let(:brewery_db_payload) {
  14
+    {
  15
+      key: key,
  16
+      nonce: nonce,
  17
+      attribute: attribute,
  18
+      attributeId: attribute_id,
  19
+      action: action,
  20
+      subAction: sub_action,
  21
+      timestamp: timestamp
  22
+    }
  23
+  }
  24
+
  25
+  subject(:web_hook) { described_class.new(brewery_db_payload) }
16 26
 
17 27
   describe '.new' do
18 28
     it 'extracts the action' do
@@ -23,7 +33,7 @@
23 33
       expect(web_hook.attribute).to eq(attribute)
24 34
     end
25 35
 
26  
-    it 'extracts the attributeId' do
  36
+    it 'extracts the attribute ID' do
27 37
       expect(web_hook.attribute_id).to eq(attribute_id)
28 38
     end
29 39
 
@@ -35,7 +45,7 @@
35 45
       expect(web_hook.nonce).to eq(nonce)
36 46
     end
37 47
 
38  
-    it 'extracts the subAction' do
  48
+    it 'extracts the sub-action' do
39 49
       expect(web_hook.sub_action).to eq(sub_action)
40 50
     end
41 51
 

0 notes on commit c418195

Please sign in to comment.
Something went wrong with that request. Please try again.