Skip to content

Commit

Permalink
Use Debug instead of Release binaries to facilitate debugging of step…
Browse files Browse the repository at this point in the history
… definitions.
  • Loading branch information
richardlawrence committed Apr 10, 2010
1 parent 5a63e15 commit 71a7d0e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions History.txt
@@ -1,6 +1,7 @@
== In Git
=== Features
* Internationalized Given/When/Then attributes
* Debug rather than Release binaries to support step definition debugging

=== Bugs Fixed

Expand Down
6 changes: 3 additions & 3 deletions Rakefile
Expand Up @@ -8,13 +8,13 @@ desc "Build the C# code with MSBuild"
task :build do
msbuild = 'c:\windows\microsoft.net\framework\v3.5\msbuild.exe'
solution = File.expand_path(File.dirname(__FILE__) + '/Cuke4Nuke/Cuke4Nuke.sln')
sh %{#{msbuild} "#{solution}" /p:configuration=Release}
sh %{#{msbuild} "#{solution}" /p:configuration=Debug}
end

desc "Run the unit tests with NUnit"
task :test do
nunit = 'C:\Program Files\NUnit 2.5.2\bin\net-2.0\nunit-console.exe'
tests = File.expand_path(File.dirname(__FILE__) + '/Cuke4Nuke/Specifications/bin/Release/Cuke4Nuke.Specifications.dll')
tests = File.expand_path(File.dirname(__FILE__) + '/Cuke4Nuke/Specifications/bin/Debug/Cuke4Nuke.Specifications.dll')
sh %{"#{nunit}" "#{tests}"}
end

Expand All @@ -33,6 +33,6 @@ namespace :log do
end

def log
file = File.expand_path(File.dirname(__FILE__) + '/Cuke4Nuke/Server/bin/Release/Cuke4NukeLog.txt')
file = File.expand_path(File.dirname(__FILE__) + '/Cuke4Nuke/Server/bin/Debug/Cuke4NukeLog.txt')
%{"#{file}"}
end
@@ -1,7 +1,7 @@
if Cucumber::IRONRUBY # We only want this to run on IronRuby

require 'spec/expectations'
$:.unshift(File.dirname(__FILE__) + '/../../bin/Release') # So we find the .dll
$:.unshift(File.dirname(__FILE__) + '/../../bin/Debug') # So we find the .dll
require 'Calc.dll'

Before do
Expand Down
4 changes: 2 additions & 2 deletions features/support/env.rb
Expand Up @@ -28,7 +28,7 @@ def cucumber_lib_dir
end

def cuke4nuke_server_exe
@cuke4nuke_server_exe ||= File.expand_path(File.join(File.dirname(__FILE__), '../../Cuke4Nuke/Server/bin/Release/Cuke4Nuke.Server.exe'))
@cuke4nuke_server_exe ||= File.expand_path(File.join(File.dirname(__FILE__), '../../Cuke4Nuke/Server/bin/Debug/Cuke4Nuke.Server.exe'))
end

def cuke4nuke_wrapper_path
Expand All @@ -46,7 +46,7 @@ def build_step_definitions(contents)
csc_path = "C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5\\csc.exe"
assembly_path = File.join(working_dir, 'bin/GeneratedStepDefinitions.dll').gsub('/', '\\')
src_path = File.join(working_dir, 'src/GeneratedStepDefinitions.cs').gsub('/', '\\')
ref_path = File.expand_path(File.join(examples_dir, '../Cuke4Nuke/Framework/bin/Release/Cuke4Nuke.Framework.dll')).gsub('/', '\\')
ref_path = File.expand_path(File.join(examples_dir, '../Cuke4Nuke/Framework/bin/Debug/Cuke4Nuke.Framework.dll')).gsub('/', '\\')
template_path = File.expand_path(File.join(File.dirname(__FILE__), 'steps_template.cs.erb'))
generated_code = ERB.new(File.read(template_path)).result(binding)
create_file(assembly_path, '')
Expand Down
2 changes: 1 addition & 1 deletion gem/Rakefile
Expand Up @@ -30,7 +30,7 @@ task :gemspec => :copy_binaries

desc "Copy Cuke4Nuke binaries to the dotnet directory"
task :copy_binaries do
Dir[File.dirname(__FILE__) + '/../Cuke4Nuke/Server/bin/Release/*.{pdb,dll,exe,config}'].each do |file|
Dir[File.dirname(__FILE__) + '/../Cuke4Nuke/Server/bin/Debug/*.{pdb,dll,exe,config}'].each do |file|
cp file, 'dotnet' unless file =~ /vshost/
end
end

0 comments on commit 71a7d0e

Please sign in to comment.