govuk_ab_testing 1.0.0 → 1.0.1

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: 74c9eed0d845a4d1139c618e74bbc6cab109f2c6
4
- data.tar.gz: bca89588653315d83e4a3a8387695685bd21558d
3
+ metadata.gz: cf8724e8049a225793408d0becd62e990dbb1ba6
4
+ data.tar.gz: ac6096751d5d9ca190bea8a4afcf960f02629623
5
5
  SHA512:
6
- metadata.gz: 694cddcacc3320548b0d558dfc7b10dd5f14f4dabc559e2edc006e14e33ce718acdaa7b4bc8c0db859ffaf3bcb78f8d71bc67e6b4ddcc79c88da33e59e7ba8a8
7
- data.tar.gz: f9a25ff78213c7012fd5ef5e5145b3ff3db28fa8b34f0e89b9654560bb5b60a789a0fc4cc309f49a0549a68ff4d02e5cd558716d0bdafc11ea47918e30df2e5f
6
+ metadata.gz: 62365454673a1f953879cd31a13d519effa971de501dc9be18de358f3cd5e372d62ebb90bf8d58d78eaa19b395f7e69d996ecc626a33272dd0e736b4442e83f5
7
+ data.tar.gz: a09800cd1ee970ca90fa77ed7f4f93f53fa1b8cfa428b9492c0eb3bb2f0efdddb3ab76a4843db6cb5b0009e4d44db2a9c8e2c322e466a265fce2f70be67cbe2e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.0.1
2
+
3
+ * Stop memoising meta tags so `with_variant` can be used multiple times in the
4
+ same test cases.
5
+
1
6
  ## 1.0.0
2
7
 
3
8
  * Pass in request headers instead of the actual request to RequestedVariant.
data/README.md CHANGED
@@ -54,7 +54,7 @@ Now, let's say you have this controller:
54
54
  class PartyController < ApplicationController
55
55
  def show
56
56
  ab_test = GovukAbTesting::AbTest.new("your_ab_test_name", dimension: 300)
57
- @requested_variant = ab_test.requested_variant(request)
57
+ @requested_variant = ab_test.requested_variant(request.headers)
58
58
  @requested_variant.configure_response(response)
59
59
 
60
60
  if @requested_variant.variant_b?
@@ -132,7 +132,7 @@ class PartyControllerTest < ActionController::TestCase
132
132
 
133
133
  get :show
134
134
 
135
- assert_unaffected_by_ab_test
135
+ assert_response_not_modified_for_ab_test
136
136
  end
137
137
  end
138
138
  ```
@@ -22,7 +22,7 @@ module GovukAbTesting
22
22
  end
23
23
 
24
24
  def analytics_meta_tags
25
- @analytics_meta_tags ||= scope.css_select(ANALYTICS_META_TAG_SELECTOR)
25
+ scope.css_select(ANALYTICS_META_TAG_SELECTOR)
26
26
  end
27
27
 
28
28
  def analytics_meta_tag
@@ -26,8 +26,7 @@ module GovukAbTesting
26
26
  end
27
27
 
28
28
  def analytics_meta_tags
29
- @analytics_meta_tags ||=
30
- capybara_page.all(ANALYTICS_META_TAG_SELECTOR, visible: :all)
29
+ capybara_page.all(ANALYTICS_META_TAG_SELECTOR, visible: :all)
31
30
  end
32
31
 
33
32
  def analytics_meta_tag
@@ -1,3 +1,3 @@
1
1
  module GovukAbTesting
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.0.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_ab_testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev