Sha256: 6cbe014e9e95da584e5ce5d738f8f8c9bef68f8e3bc9970156de5859e8f2054e
Contents?: true
Size: 985 Bytes
Versions: 5
Compression:
Stored size: 985 Bytes
Contents
# frozen_string_literal: true require "spec_helper" module SocialNetworking module Reports RSpec.describe OffTopicPost do fixtures :all def data @data ||= OffTopicPost.all end describe ".all" do context "when no 'on the mind' statements made" do it "returns an empty array" do SocialNetworking::OnTheMindStatement.destroy_all expect(data).to be_empty end end context "when 'on the mind' statements made" do it "returns accurate summaries" do participant = participants(:participant1) statement = SocialNetworking::OnTheMindStatement.first expect(data.count).to eq 2 expect(data).to include( participant_id: participant.study_id, occurred_at: statement.created_at.iso8601, description: statement.description ) end end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems