Sha256: 7ababee21532aab19f466274027e269083698be6a9100155ee53eec8ec31be2d
Contents?: true
Size: 654 Bytes
Versions: 34
Compression:
Stored size: 654 Bytes
Contents
require 'test_helper' module PushType class UserTest < ActiveSupport::TestCase let(:user) { User.new } it { user.wont_be :valid? } it 'should be valid with required attributes' do user.attributes = FactoryGirl.attributes_for :user user.must_be :valid? end describe '#initials' do let(:user_one) { User.new name: 'Joe' } let(:user_two) { User.new name: 'Joe Bloggs' } let(:user_three) { User.new name: 'Joe Smithe Henley-Bloggs' } it { user_one.initials.must_equal 'J' } it { user_two.initials.must_equal 'JB' } it { user_three.initials.must_equal 'JH' } end end end
Version data entries
34 entries across 34 versions & 1 rubygems