diff --git a/bin/tm b/bin/tm index 2ba0478..833e07a 100755 --- a/bin/tm +++ b/bin/tm @@ -3,5 +3,5 @@ # The 'ticketmaster' gem was installed using rubygems # This file is the CLI application to use with 'ticketmaster' -require File.dirname(__FILE__) + '/../lib/ticketmaster/cli/init.rb' +require File.dirname(__FILE__) + '/../lib/taskmapper/cli/init.rb' diff --git a/examples/tm_example.rb b/examples/tm_example.rb index 709bbb0..bec2405 100644 --- a/examples/tm_example.rb +++ b/examples/tm_example.rb @@ -1,9 +1,9 @@ require 'rubygems' -require 'ticketmaster' -require 'ticketmaster-lighthouse' +require 'taskmapper' +require 'taskmapper-lighthouse' # display list of projects -tm = TicketMaster.new(:lighthouse) +tm = TaskMapper.new(:lighthouse) tm.projects.each {|project| puts "#{project.id} - #{project.name}" } diff --git a/examples/tm_example_2.rb b/examples/tm_example_2.rb index 774781b..ff43828 100644 --- a/examples/tm_example_2.rb +++ b/examples/tm_example_2.rb @@ -1,9 +1,9 @@ require 'rubygems' -require 'ticketmaster' -require 'ticketmaster-pivotal' +require 'taskmapper' +require 'taskmapper-pivotal' # display list of tickets for last project -tm = TicketMaster.new(:pivotal) +tm = TaskMapper.new(:pivotal) project = tm.projects.last project.tickets.each {|ticket| puts "#{ticket.id} - #{ticket.title}" diff --git a/examples/tm_example_3.rb b/examples/tm_example_3.rb index bd7d7a9..f996348 100644 --- a/examples/tm_example_3.rb +++ b/examples/tm_example_3.rb @@ -1,11 +1,11 @@ require 'rubygems' -require 'ticketmaster' -require 'ticketmaster-pivotal' -require 'ticketmaster-lighthouse' +require 'taskmapper' +require 'taskmapper-pivotal' +require 'taskmapper-lighthouse' # copy all tickets and comments from pivotal tracker to new lighthouse project (the hard way) -pivotal = TicketMaster.new(:pivotal) -lighthouse = TicketMaster.new(:lighthouse) +pivotal = TaskMapper.new(:pivotal) +lighthouse = TaskMapper.new(:lighthouse) from = pivotal.project(97107) diff --git a/examples/tm_example_4.rb b/examples/tm_example_4.rb index ce2ff86..194c792 100644 --- a/examples/tm_example_4.rb +++ b/examples/tm_example_4.rb @@ -1,11 +1,11 @@ require 'rubygems' -require 'ticketmaster' -require 'ticketmaster-pivotal' -require 'ticketmaster-lighthouse' +require 'taskmapper' +require 'taskmapper-pivotal' +require 'taskmapper-lighthouse' # copy all tickets and comments from pivotal tracker to new lighthouse project (the easy way) -pivotal = TicketMaster.new(:pivotal) -lighthouse = TicketMaster.new(:lighthouse) +pivotal = TaskMapper.new(:pivotal) +lighthouse = TaskMapper.new(:lighthouse) from = pivotal.project(97107) to = lighthouse.project!(:name => "Copy Test on #{Time.now}", diff --git a/lib/ticketmaster.rb b/lib/taskmapper.rb similarity index 93% rename from lib/ticketmaster.rb rename to lib/taskmapper.rb index f87ab31..e472595 100644 --- a/lib/ticketmaster.rb +++ b/lib/taskmapper.rb @@ -36,7 +36,7 @@ class TaskMapper def initialize(system = nil, authentication = nil) if system.nil? or authentication.nil? require 'yaml' - data = YAML.load_file File.expand_path(ENV['TICKETMASTER_CONFIG'] || '~/.ticketmaster.yml') + data = YAML.load_file File.expand_path(ENV['TASKMAPPER_CONFIG'] || '~/.taskmapper.yml') system = system.nil? ? data['default'] || data.first.first : system.to_s authentication = data[system]['authentication'] if authentication.nil? and data[system]['authentication'] end diff --git a/lib/ticketmaster/authenticator.rb b/lib/taskmapper/authenticator.rb similarity index 100% rename from lib/ticketmaster/authenticator.rb rename to lib/taskmapper/authenticator.rb diff --git a/lib/ticketmaster/cli/commands/config.rb b/lib/taskmapper/cli/commands/config.rb similarity index 100% rename from lib/ticketmaster/cli/commands/config.rb rename to lib/taskmapper/cli/commands/config.rb diff --git a/lib/ticketmaster/cli/commands/console.rb b/lib/taskmapper/cli/commands/console.rb similarity index 100% rename from lib/ticketmaster/cli/commands/console.rb rename to lib/taskmapper/cli/commands/console.rb diff --git a/lib/ticketmaster/cli/commands/generate.rb b/lib/taskmapper/cli/commands/generate.rb similarity index 100% rename from lib/ticketmaster/cli/commands/generate.rb rename to lib/taskmapper/cli/commands/generate.rb diff --git a/lib/ticketmaster/cli/commands/generate/provider.rb b/lib/taskmapper/cli/commands/generate/provider.rb similarity index 100% rename from lib/ticketmaster/cli/commands/generate/provider.rb rename to lib/taskmapper/cli/commands/generate/provider.rb diff --git a/lib/ticketmaster/cli/commands/generate/provider/comment.rb b/lib/taskmapper/cli/commands/generate/provider/comment.rb similarity index 100% rename from lib/ticketmaster/cli/commands/generate/provider/comment.rb rename to lib/taskmapper/cli/commands/generate/provider/comment.rb diff --git a/lib/ticketmaster/cli/commands/generate/provider/project.rb b/lib/taskmapper/cli/commands/generate/provider/project.rb similarity index 100% rename from lib/ticketmaster/cli/commands/generate/provider/project.rb rename to lib/taskmapper/cli/commands/generate/provider/project.rb diff --git a/lib/ticketmaster/cli/commands/generate/provider/provider.rb b/lib/taskmapper/cli/commands/generate/provider/provider.rb similarity index 100% rename from lib/ticketmaster/cli/commands/generate/provider/provider.rb rename to lib/taskmapper/cli/commands/generate/provider/provider.rb diff --git a/lib/ticketmaster/cli/commands/generate/provider/ticket.rb b/lib/taskmapper/cli/commands/generate/provider/ticket.rb similarity index 100% rename from lib/ticketmaster/cli/commands/generate/provider/ticket.rb rename to lib/taskmapper/cli/commands/generate/provider/ticket.rb diff --git a/lib/ticketmaster/cli/commands/help.rb b/lib/taskmapper/cli/commands/help.rb similarity index 100% rename from lib/ticketmaster/cli/commands/help.rb rename to lib/taskmapper/cli/commands/help.rb diff --git a/lib/taskmapper/cli/commands/help/config b/lib/taskmapper/cli/commands/help/config new file mode 100644 index 0000000..e19bbf8 --- /dev/null +++ b/lib/taskmapper/cli/commands/help/config @@ -0,0 +1,27 @@ +This command is used to configure taskmapper settings for use in your terminal. + +By default, taskmapper searches for the config information in a file named 'taskmapper.yml' in the current directory. Next it searches for 'config/taskmapper.yml' and if that fails, it uses the home directory's ~/.taskmapper.yml (note the . in front on this one). There is also the TASKMAPPER environment variable that you can set to point to another configuration file anywhere if necessary. + +This command helps facilitate the creation of a taskmapper.yml. + +Warning: Due to the way the authentication is parsed, if any keys or values contain a comma (,) or colin (:), it can not be parsed through the -A command. Usually this isn't a problem, and if it is, it can be resolved though putting the values in a config file. + +Example: + tm -c ~/.taskmapper.yml -p dummy -A username:cheese,password:cakes -P 555 config --add + tm -p dummy config --set-default-provider + +The format for taskmapper.yml is: + default: + : + authentication: + + project: + [...] + +For example, a taskmapper.yml with the Dummy provider would look something like this: + default: dummy + dummy: + authentication: + username: name + password: doesnt-matter + project: 555 diff --git a/lib/ticketmaster/cli/commands/help/console b/lib/taskmapper/cli/commands/help/console similarity index 68% rename from lib/ticketmaster/cli/commands/help/console rename to lib/taskmapper/cli/commands/help/console index a5b5032..aa855c2 100644 --- a/lib/ticketmaster/cli/commands/help/console +++ b/lib/taskmapper/cli/commands/help/console @@ -1,7 +1,7 @@ -This command is used to open an irb session with the ticketmaster. +This command is used to open an irb session with the taskmapper. -The configuration for this command should mostly be dependent on the ticketmaster.yml files. -See ticketmaster help config for more information on how to set it up. +The configuration for this command should mostly be dependent on the taskmapper.yml files. +See taskmapper help config for more information on how to set it up. Example: tm console diff --git a/lib/ticketmaster/cli/commands/help/generate b/lib/taskmapper/cli/commands/help/generate similarity index 83% rename from lib/ticketmaster/cli/commands/help/generate rename to lib/taskmapper/cli/commands/help/generate index c23a68a..1fafd23 100644 --- a/lib/ticketmaster/cli/commands/help/generate +++ b/lib/taskmapper/cli/commands/help/generate @@ -2,7 +2,7 @@ This command is used to generate a new provider. It generates some basic files to get you started on creating your own provider. -NOTE: This command, in an attempt to keep provider names consistent, will prepend 'ticketmaster-' to the given provider name. You can cancel this by prepending a _ before your provider name, which will be removed if found. +NOTE: This command, in an attempt to keep provider names consistent, will prepend 'taskmapper-' to the given provider name. You can cancel this by prepending a _ before your provider name, which will be removed if found. If you have not created a gem directory or skeleton and want to use Jeweler (http://github.com/technicalpickles/jeweler) you can execute: diff --git a/lib/ticketmaster/cli/commands/help/help b/lib/taskmapper/cli/commands/help/help similarity index 100% rename from lib/ticketmaster/cli/commands/help/help rename to lib/taskmapper/cli/commands/help/help diff --git a/lib/ticketmaster/cli/commands/help/project b/lib/taskmapper/cli/commands/help/project similarity index 85% rename from lib/ticketmaster/cli/commands/help/project rename to lib/taskmapper/cli/commands/help/project index 017a22b..81c9529 100644 --- a/lib/ticketmaster/cli/commands/help/project +++ b/lib/taskmapper/cli/commands/help/project @@ -5,7 +5,7 @@ It can be used to do any of the CRUD actions with projects that are provided by It will attempt to load data through the config files if they are available. See 'tm help config' for more information. Examples: - tm -p lighthouse -A account:ticketmaster,token:abc project --create name "new project" + tm -p lighthouse -A account:taskmapper,token:abc project --create name "new project" tm project --read 946 tm --project 946 project --read tm -p dummy -A "user:common coder,pass:w3rd out" project --destroy 712 diff --git a/lib/ticketmaster/cli/commands/help/ticket b/lib/taskmapper/cli/commands/help/ticket similarity index 86% rename from lib/ticketmaster/cli/commands/help/ticket rename to lib/taskmapper/cli/commands/help/ticket index 32cc539..177a202 100644 --- a/lib/ticketmaster/cli/commands/help/ticket +++ b/lib/taskmapper/cli/commands/help/ticket @@ -7,7 +7,7 @@ It will attempt to load data through the config files if they are available. See If any of the keys or values contain a space, you will have to enclose that key or value in quotes. For example, if you set name to ProjectName it does not need to be quoted, but if you set name to Project Name it will have to be quoted to "Project Name" or 'Project Name' Examples: - tm -p lighthouse -A account:ticketmaster,token:abc ticket --create name "new ticket" description "this is a new ticket" + tm -p lighthouse -A account:taskmapper,token:abc ticket --create name "new ticket" description "this is a new ticket" tm --project 946 ticket --read --ticket 2 tm -p dummy -A "user:common coder,pass: w3rd out" ticket --destroy --ticket 12 tm -p dummy -P 712 ticket --destroy --ticket 4 diff --git a/lib/ticketmaster/cli/commands/project.rb b/lib/taskmapper/cli/commands/project.rb similarity index 100% rename from lib/ticketmaster/cli/commands/project.rb rename to lib/taskmapper/cli/commands/project.rb diff --git a/lib/ticketmaster/cli/commands/ticket.rb b/lib/taskmapper/cli/commands/ticket.rb similarity index 100% rename from lib/ticketmaster/cli/commands/ticket.rb rename to lib/taskmapper/cli/commands/ticket.rb diff --git a/lib/ticketmaster/cli/common.rb b/lib/taskmapper/cli/common.rb similarity index 100% rename from lib/ticketmaster/cli/common.rb rename to lib/taskmapper/cli/common.rb diff --git a/lib/ticketmaster/cli/init.rb b/lib/taskmapper/cli/init.rb similarity index 100% rename from lib/ticketmaster/cli/init.rb rename to lib/taskmapper/cli/init.rb diff --git a/lib/ticketmaster/comment.rb b/lib/taskmapper/comment.rb similarity index 100% rename from lib/ticketmaster/comment.rb rename to lib/taskmapper/comment.rb diff --git a/lib/ticketmaster/common.rb b/lib/taskmapper/common.rb similarity index 100% rename from lib/ticketmaster/common.rb rename to lib/taskmapper/common.rb diff --git a/lib/ticketmaster/dummy/comment.rb b/lib/taskmapper/dummy/comment.rb similarity index 100% rename from lib/ticketmaster/dummy/comment.rb rename to lib/taskmapper/dummy/comment.rb diff --git a/lib/ticketmaster/dummy/dummy.rb b/lib/taskmapper/dummy/dummy.rb similarity index 100% rename from lib/ticketmaster/dummy/dummy.rb rename to lib/taskmapper/dummy/dummy.rb diff --git a/lib/ticketmaster/dummy/project.rb b/lib/taskmapper/dummy/project.rb similarity index 100% rename from lib/ticketmaster/dummy/project.rb rename to lib/taskmapper/dummy/project.rb diff --git a/lib/ticketmaster/dummy/ticket.rb b/lib/taskmapper/dummy/ticket.rb similarity index 100% rename from lib/ticketmaster/dummy/ticket.rb rename to lib/taskmapper/dummy/ticket.rb diff --git a/lib/ticketmaster/exception.rb b/lib/taskmapper/exception.rb similarity index 100% rename from lib/ticketmaster/exception.rb rename to lib/taskmapper/exception.rb diff --git a/lib/ticketmaster/helper.rb b/lib/taskmapper/helper.rb similarity index 100% rename from lib/ticketmaster/helper.rb rename to lib/taskmapper/helper.rb diff --git a/lib/ticketmaster/project.rb b/lib/taskmapper/project.rb similarity index 100% rename from lib/ticketmaster/project.rb rename to lib/taskmapper/project.rb diff --git a/lib/ticketmaster/provider.rb b/lib/taskmapper/provider.rb similarity index 100% rename from lib/ticketmaster/provider.rb rename to lib/taskmapper/provider.rb diff --git a/lib/ticketmaster/tester/comment.rb b/lib/taskmapper/tester/comment.rb similarity index 100% rename from lib/ticketmaster/tester/comment.rb rename to lib/taskmapper/tester/comment.rb diff --git a/lib/ticketmaster/tester/project.rb b/lib/taskmapper/tester/project.rb similarity index 100% rename from lib/ticketmaster/tester/project.rb rename to lib/taskmapper/tester/project.rb diff --git a/lib/ticketmaster/tester/tester.rb b/lib/taskmapper/tester/tester.rb similarity index 100% rename from lib/ticketmaster/tester/tester.rb rename to lib/taskmapper/tester/tester.rb diff --git a/lib/ticketmaster/tester/ticket.rb b/lib/taskmapper/tester/ticket.rb similarity index 100% rename from lib/ticketmaster/tester/ticket.rb rename to lib/taskmapper/tester/ticket.rb diff --git a/lib/ticketmaster/ticket.rb b/lib/taskmapper/ticket.rb similarity index 100% rename from lib/ticketmaster/ticket.rb rename to lib/taskmapper/ticket.rb diff --git a/lib/ticketmaster/cli/commands/help/config b/lib/ticketmaster/cli/commands/help/config deleted file mode 100644 index 2df3080..0000000 --- a/lib/ticketmaster/cli/commands/help/config +++ /dev/null @@ -1,27 +0,0 @@ -This command is used to configure ticketmaster settings for use in your terminal. - -By default, ticketmaster searches for the config information in a file named 'ticketmaster.yml' in the current directory. Next it searches for 'config/ticketmaster.yml' and if that fails, it uses the home directory's ~/.ticketmaster.yml (note the . in front on this one). There is also the TICKETMASTER_CONFIG environment variable that you can set to point to another configuration file anywhere if necessary. - -This command helps facilitate the creation of a ticketmaster.yml. - -Warning: Due to the way the authentication is parsed, if any keys or values contain a comma (,) or colin (:), it can not be parsed through the -A command. Usually this isn't a problem, and if it is, it can be resolved though putting the values in a config file. - -Example: - tm -c ~/.ticketmaster.yml -p dummy -A username:cheese,password:cakes -P 555 config --add - tm -p dummy config --set-default-provider - -The format for ticketmaster.yml is: - default: - : - authentication: - - project: - [...] - -For example, a ticketmaster.yml with the Dummy provider would look something like this: - default: dummy - dummy: - authentication: - username: name - password: doesnt-matter - project: 555 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 058f23a..9465c76 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,7 @@ $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -require 'ticketmaster.rb' -require 'ticketmaster/dummy/dummy.rb' +require 'taskmapper.rb' +require 'taskmapper/dummy/dummy.rb' require 'rspec' RSpec.configure do |config| diff --git a/spec/ticketmaster-cli_spec.rb b/spec/taskmapper-cli_spec.rb similarity index 100% rename from spec/ticketmaster-cli_spec.rb rename to spec/taskmapper-cli_spec.rb diff --git a/spec/taskmapper-exception_spec.rb b/spec/taskmapper-exception_spec.rb new file mode 100644 index 0000000..5b3bb39 --- /dev/null +++ b/spec/taskmapper-exception_spec.rb @@ -0,0 +1,160 @@ +$LOAD_PATH.unshift(File.dirname(__FILE__)) +$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) +require File.expand_path(File.dirname(__FILE__) + '/spec_helper') +require 'rubygems' +require 'ticketmaster' + +describe "TaskMapper Exception Messages" do + let(:exception) { TaskMapper::Exception } + let(:tm) { TaskMapper.new(:tester, {}) } + let(:validation_error) { "TaskMapper::Provider::Base::valid? method must be implemented by the provider" } + let(:easy_finder_error) { "TaskMapper::Provider::Helper::easy_finder method must be implemented by the provider" } + + describe TaskMapper::Provider::Base do + context "when calling #valid? method" do + subject { lambda { tm.valid? } } + it { should raise_error(exception, validation_error) } + end + end + + describe TaskMapper::Provider::Helper do + context "when calling #easy_finder" do + subject { lambda { tm.easy_finder(1, :test, {}) } } + it { should raise_error(exception, easy_finder_error) } + end + end + + describe TaskMapper::Provider::Tester::Project do + let(:find_by_id_error) { "TaskMapper::Provider::Tester::Project::find_by_id method must be implemented by the provider" } + let(:find_by_attributes_error) { "TaskMapper::Provider::Tester::Project::find_by_attributes method must be implemented by the provider" } + let(:search_error) { "TaskMapper::Provider::Tester::Project::search method must be implemented by the provider"} + let(:create_error) { "TaskMapper::Provider::Tester::Project::create method must be implemented by the provider"} + let(:save_error) { "TaskMapper::Provider::Tester::Project::save method must be implemented by the provider"} + let(:destroy_error) { "TaskMapper::Provider::Tester::Project::destroy method must be implemented by the provider" } + + context "when calling #find_by_id" do + subject { lambda { tm.project([1]) } } + it { should raise_error(exception, find_by_id_error) } + end + + context "when calling #find_by_attributes" do + subject { lambda { tm.project.find :all, :name => 'Test Project' } } + it { should raise_error(exception, find_by_attributes_error) } + end + + context "when calling #search" do + subject { lambda { tm.project.search :tag => 'testing' } } + it { should raise_error(exception, search_error) } + end + + context "when calling #create" do + subject { lambda { tm.project.create :name => 'Foo Bar' } } + it { should raise_error(exception, create_error) } + end + + context "when calling #save" do + subject { lambda { tm.project.save } } + pending { should raise_error(exception, save_error) } + end + + context "when calling #destroy" do + let(:project) { TaskMapper::Provider::Tester::Project.new } + subject { lambda { project.destroy } } + it { should raise_error(exception, destroy_error) } + end + end + + describe TaskMapper::Provider::Tester::Ticket do + let(:ticket) { TaskMapper::Provider::Tester::Ticket.new(1) } + let(:find_by_id_error) { "TaskMapper::Provider::Tester::Ticket::find_by_id method must be implemented by the provider" } + let(:find_by_attributes_error) { "TaskMapper::Provider::Tester::Ticket::find_by_attributes method must be implemented by the provider" } + let(:search_error) { "TaskMapper::Provider::Tester::Ticket::search method must be implemented by the provider" } + let(:create_error) { "TaskMapper::Provider::Tester::Ticket::create method must be implemented by the provider" } + let(:save_error) { "TaskMapper::Provider::Tester::Ticket::save method must be implemented by the provider" } + let(:destroy_error) { "TaskMapper::Provider::Tester::Ticket::destroy method must be implemented by the provider" } + let(:close_error) { "TaskMapper::Provider::Tester::Ticket::close method must be implemented by the provider" } + let(:reload_error) { "TaskMapper::Provider::Tester::Ticket::reload! method must be implemented by the provider" } + + context "when #find_by_id" do + subject { lambda { tm.tickets(:id => 22) } } + it { should raise_error(exception, find_by_id_error) } + end + + context "when #find_by_attributes" do + subject { lambda { tm.ticket.find(1, :all, :title => 'Test ticket') } } + it { should raise_error(exception, find_by_attributes_error) } + end + + context "when #search" do + subject { lambda { tm.ticket.search :tag => 'testing' } } + it { should raise_error(exception, search_error) } + end + + context "when #create" do + subject { lambda { tm.ticket.create :name => 'Foo Bar' } } + it { should raise_error(exception, create_error) } + end + + context "when #save" do + subject { lambda { ticket.save } } + it { should raise_error(exception, save_error) } + end + + context "when #destroy" do + subject { lambda { ticket.destroy } } + it { should raise_error(exception, destroy_error) } + end + + context "when #close" do + subject { lambda { ticket.close } } + it { should raise_error(exception, close_error) } + end + + context "when #reload!" do + subject { lambda { ticket.reload! } } + it { should raise_error(exception, reload_error) } + end + end + + describe TaskMapper::Provider::Tester::Comment do + let(:ticket_with_comments) { TaskMapper::Provider::Tester::Ticket.new(1) } + let(:comment) { TaskMapper::Provider::Tester::Comment.new(1, 1) } + let(:find_by_id_error) { "TaskMapper::Provider::Tester::Comment::find_by_id method must be implemented by the provider" } + let(:find_by_attributes_error) { "TaskMapper::Provider::Tester::Comment::find_by_attributes method must be implemented by the provider" } + let(:search_error) { "TaskMapper::Provider::Tester::Comment::search method must be implemented by the provider" } + let(:create_error) { "TaskMapper::Provider::Tester::Comment::create method must be implemented by the provider" } + let(:save_error) { "TaskMapper::Provider::Tester::Comment::save method must be implemented by the provider" } + let(:destroy_error) { "TaskMapper::Provider::Tester::Comment::destroy method must be implemented by the provider" } + + context "when #find_by_id" do + subject { lambda { ticket_with_comments.comment.find(1,1,[1,2]) } } + it { should raise_error(exception, find_by_id_error) } + end + + context "when #find_by_attributes" do + subject { lambda { ticket_with_comments.comment.find(1, 1, :all, :tag => 'tag') } } + it { should raise_error(exception, find_by_attributes_error) } + end + + context "when #search" do + subject { lambda { ticket_with_comments.comment.search(1, 1, :tag => 'testing') } } + it { should raise_error(exception, search_error) } + end + + context "when #create" do + subject { lambda { ticket_with_comments.comment.create :name => 'Foo Bar' } } + it { should raise_error(exception, create_error) } + end + + context "when #save" do + subject { lambda { comment.save } } + it { should raise_error(exception, save_error) } + end + + context "when #destroy" do + subject { lambda { comment.destroy } } + it { should raise_error(exception, destroy_error) } + end + end +end + diff --git a/spec/ticketmaster_spec.rb b/spec/taskmapper_spec.rb similarity index 100% rename from spec/ticketmaster_spec.rb rename to spec/taskmapper_spec.rb