This conversion is done by Transpec 2.3.1 with the following command:
transpec -f -c "bundle exec rake spec"
* 82 conversions
from: it { should ... }
to: it { is_expected.to ... }
* 21 conversions
from: == expected
to: eq(expected)
* 20 conversions
from: obj.should
to: expect(obj).to
* 5 conversions
from: its([:key]) { }
to: describe '[:key]' do subject { super()[:key] }; it { } end
* 1 conversion
from: it { should_not ... }
to: it { is_expected.not_to ... }
* 1 conversion
from: its(:attr) { }
to: describe '#attr' do subject { super().attr }; it { } end
For more details: https://github.com/yujinakayama/transpec#supported-conversions
Interactions between resource refreshes and the 'unless' parameter have been
fixed to follow the behaviour of the 'exec' type.
The 'unless' parameter is now always taken into account, whether in ordinary
operation, during a refresh, or when refreshonly is set to true. The resource
will not run the SQL command when the 'unless' clause matches a row.
Previously a refresh on a resource would ignore the 'unless' parameter if set
which could cause a failure re-running a command, such as attempting to create
a role that already exists.
The following examples have been fixed:
* should not run SQL when refreshed and the unless query returns rows
* with refreshonly should not run SQL when the unless query returns no rows
* with refreshonly should not run SQL when refreshed and the unless query
returns rows
This is done by moving the logic for refreshonly and whether to run the SQL
command from the provider into the type, and consolidating it in the
should_run_sql method which is called during 'command' property retrieval
(instead of sync) and during refresh.
This allows you to set a schema search_path on postgresql_psql
resources, in case you have multiple schemas in your database and the
SQL you are trying to run requires a different path