# Generated from test_seeds-0.0.4.gem by gem2rpm -*- rpm-spec -*- %global gem_name test_seeds Name: rubygem-%{gem_name} Version: 0.0.4 Release: 1%{?dist} Summary: Test Seeds allow efficient usage of object factories (like Factory Girl) in tests. Instead of creating objects for similar scenarios in each test case, Test Seeds start a db transaction for each test file, creates all the common objects once, and then uses db savepoints for each test case License: MIT URL: http://github.com/pkmiec/test_seeds Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby # BuildRequires: rubygem(jeweler) >= 1.6.4 # BuildRequires: rubygem(jeweler) < 1.7 # BuildRequires: rubygem(mysql2) < 0.3 # BuildRequires: rubygem(activerecord) >= 3.0.0 # BuildRequires: rubygem(activerecord) < 3.1 BuildArch: noarch %description Test Seeds piggy backs on the transaction fixtures functionality. Test Seeds load fixtures into the database in the same way but then start a db transaction for the duration of the test file. Any objects for the common scenarios are then created and inserted into the database. Test Seeds then execute each test case within a context of a db savepoint (or nested db transactions). This allows test seeds to be inserted into the database once and then re-used for each test case that needs it. %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} # Run the test suite. popd %files %dir %{gem_instdir} %license %{gem_instdir}/LICENSE.txt %{gem_instdir}/VERSION %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %doc %{gem_instdir}/.document %{gem_instdir}/Gemfile %{gem_instdir}/Gemfile.lock %doc %{gem_instdir}/README.rdoc %{gem_instdir}/Rakefile %{gem_instdir}/test %{gem_instdir}/test_all.sh %{gem_instdir}/test_seeds.gemspec %changelog * Thu Sep 16 2021 mockbuilder - 0.0.4-1 - Initial package