Sha256: 46382d8440784ece3f287a97da143adcc0be3add4fdd4485e9f277515a9307ea
Contents?: true
Size: 863 Bytes
Versions: 7
Compression:
Stored size: 863 Bytes
Contents
require "spec_helper" RSpec.describe Applicaster::Test::Accounts::MockData do subject(:mock_data) { described_class.new } describe "#all_accounts_attributes" do it "has 2 elements" do expect(mock_data.all_accounts_attributes.size).to eq(2) end describe "returned account" do subject(:account) { mock_data.all_accounts_attributes.first } let(:id_regexp) { /^11223344\d{16}$/ } it { is_expected.to include(id: id_regexp) } it { is_expected.to include(old_id: id_regexp) } it { is_expected.to include(name: /Test Account \d+/) } end end describe "#user_attributes" do subject(:user) { mock_data.user_attributes } it { is_expected.to include(:id) } it { is_expected.to include(name: /\ATest User \d+\z/) } it { is_expected.to include(email: /\Atest-user\d+@example.com\z/) } end end
Version data entries
7 entries across 7 versions & 1 rubygems