Sha256: 249308e45bccc2bd28df10206abeb8a670903fbf6852637b5cf88e941a5d98d4
Contents?: true
Size: 1018 Bytes
Versions: 3
Compression:
Stored size: 1018 Bytes
Contents
require_relative "../../../test_helper" module Troo describe MemberDecorator do let(:described_class) { MemberDecorator } before { @member = Fabricate(:member) } after { database_cleanup } describe "#initialize" do subject { described_class.new(@member) } it "assigns the member to an instance variable" do subject.instance_variable_get("@member").must_equal(@member) end end describe "#username" do subject { described_class.new(@member).username } it "returns the member's username" do subject.must_equal("@#{@member.username}") end end describe "#name" do subject { described_class.new(@member).name } it "returns the member's full name" do subject.must_equal(@member.full_name) end end describe "#initials" do subject { described_class.new(@member).initials } it "returns the member's initials" do subject.must_equal(@member.initials) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
troo-0.0.4 | test/lib/troo/display/member_decorator_test.rb |
troo-0.0.3 | test/lib/troo/display/member_decorator_test.rb |
troo-0.0.2 | test/lib/troo/display/member_decorator_test.rb |