Sha256: 0ffb503207b67070d36b2e8ff165da5b065f6e9cc7c0ee43179bcfc6ad13ca76
Contents?: true
Size: 702 Bytes
Versions: 53
Compression:
Stored size: 702 Bytes
Contents
require 'json' require 'fileutils' Pact.provider_states_for 'the-wild-beast-store' do provider_state :the_zebras_are_here do set_up do FileUtils.mkdir_p 'tmp' some_data = [{'name' => 'Jason'},{'name' => 'Sarah'}] File.open("tmp/a_mock_database.json", "w") { |file| file << some_data.to_json } end tear_down do FileUtils.rm_rf("tmp/a_mock_database.json") end end end Pact.provider_state "some other zebras are here" do set_up do some_data = [{'name' => 'Mark'},{'name' => 'Gertrude'}] File.open("tmp/a_mock_database.json", "w") { |file| file << some_data.to_json } end tear_down do FileUtils.rm_rf("tmp/a_mock_database.json") end end
Version data entries
53 entries across 53 versions & 1 rubygems