Sha256: 02239cd356b8753caf2f07db6d2a93f4e554642fddb27ada59b6f1ca28ad1b04
Contents?: true
Size: 1.36 KB
Versions: 16
Compression:
Stored size: 1.36 KB
Contents
# -*- encoding : utf-8 -*- require 'mdwa/dsl' require 'minitest/spec' require 'minitest/autorun' describe MDWA::DSL::Entity do before do MDWA::DSL.requirements.register do |r| r.summary = 'Manage Projects' r.description = %q{Detailed description of the requirement.} r.entities = ['ProjectGroup', 'Project', 'Task', 'Milestone'] r.users = ['Administrator', 'TeamMember'] end MDWA::DSL.requirements.register 'Manage clients' do |r| r.alias = 'clients' end end it 'should store data correctly' do requirement = MDWA::DSL.requirement('manage_projects') requirement.summary.must_equal 'Manage Projects' requirement.description.must_equal 'Detailed description of the requirement.' requirement.entities.count.must_equal 4 requirement.entities[0].must_equal 'ProjectGroup' requirement.entities[1].must_equal 'Project' requirement.entities[2].must_equal 'Task' requirement.entities[3].must_equal 'Milestone' requirement.users.count.must_equal 2 requirement.users[0].must_equal 'Administrator' requirement.users[1].must_equal 'TeamMember' requirement_client = MDWA::DSL.requirement('clients') requirement_client.nil?.must_equal false requirement_client.summary.must_equal 'Manage clients' requirement_client.alias.must_equal 'clients' end end
Version data entries
16 entries across 16 versions & 1 rubygems