Commit 0b7c26a
Changed files (6)
product
application.tests
product/application.tests/io/WindowsFileSystemSpecs.cs
@@ -16,20 +16,25 @@ namespace tests.io
public abstract class concern : observations_for_a_sut_with_a_contract<FileSystem, WindowsFileSystem> {}
[Concern(typeof (WindowsFileSystem))]
- [FixtureCategory("SLOW")]
+ //[FixtureCategory("SLOW")]
public class when_retrieving_all_the_sql_migrations_scripts_from_a_directory : concern
{
context c = () =>
{
- directory = Path.Combine(Environment.CurrentDirectory, "sample_files");
+ //directory = Path.Combine(Environment.CurrentDirectory, "sample_files");
+ directory = AppDomain.CurrentDomain.BaseDirectory;
first_sql_file = Path.Combine(directory, "0001_first_test_file.sql");
second_sql_file = Path.Combine(directory, "0002_second_sql_file.sql");
template_file = Path.Combine(directory, "0001_first_test_file.sql.template");
+
+ File.WriteAllText(first_sql_file.path, "");
+ File.WriteAllText(second_sql_file.path, "");
+ File.WriteAllText(template_file.path, "");
};
because b = () =>
{
- results =controller. sut.all_sql_files_from(directory);
+ results = controller.sut.all_sql_files_from(directory);
};
it should_return_each_sql_file_found_in_the_directory = () =>
@@ -44,6 +49,13 @@ namespace tests.io
results.should_not_contain(template_file);
};
+ after_each_observation a = () =>
+ {
+ File.Delete(first_sql_file.path);
+ File.Delete(second_sql_file.path);
+ File.Delete(template_file.path);
+ };
+
static IEnumerable<SqlFile> results;
static SqlFile first_sql_file;
static SqlFile second_sql_file;
product/application.tests/sample_files/0001_first_test_file.sql
@@ -1,1 +0,0 @@
-
product/application.tests/sample_files/0001_first_test_file.sql.template
@@ -1,1 +0,0 @@
-
\ No newline at end of file
product/application.tests/sample_files/0002_second_sql_file.sql
@@ -1,1 +0,0 @@
-
product/application.tests/application.tests.csproj
@@ -87,17 +87,6 @@
<Name>application</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup>
- <None Include="sample_files\0001_first_test_file.sql">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
- <None Include="sample_files\0001_first_test_file.sql.template">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Include="sample_files\0002_second_sql_file.sql">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </None>
- </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
rakefile.rb
@@ -66,6 +66,12 @@ task :test, :category_to_exclude, :needs => [:compile] do |t,args|
runner.execute_tests ["#{Project.tests_dir}"]
end
+task :test_all, :category_to_exclude, :needs => [:compile] do |t,args|
+ puts Project.startup_dir
+ runner = MbUnitRunner.new :compile_target => COMPILE_TARGET, :category_to_exclude => 'none', :show_report => true, :report_type => "text"
+ runner.execute_tests ["#{Project.tests_dir}"]
+end
+
task :info do
puts "project name: " + Project.name
puts "project tests dir: " + Project.tests_dir