lib/rspec-api/matchers/page.rb in rspec-api-0.1.1 vs lib/rspec-api/matchers/page.rb in rspec-api-0.1.2

- old
+ new

@@ -1,11 +1,11 @@ RSpec::Matchers.define :have_pagination_links do |page| match do |response_headers| if page.nil? true else - links = response_headers['Link'] || '' # https://github.com/lostisland/faraday/pull/306 + links = response_headers['Link'] || '' # see http://git.io/CUz3-Q rels = links.split(',').map{|link| link[/<.+?>; rel="(.*)"$/, 1]} rels.sort == ['first', 'prev'] end end @@ -14,7 +14,6 @@ end failure_message_for_should do |response_headers| %Q(should #{description}, but are #{response_headers}) end -end - +end \ No newline at end of file