Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
daeltar-mini_factory
Advanced tools
mini_factory is simple factory builder
Put following line in your test enviroment file: config.gem 'daeltar-mini_factory', :source => 'http://gems.github.com', :lib => 'mini_factory'
Create some factories under Rails test directory in file called factories.rb:
Factory.define :account do
{
:login => "alexis",
:password => "topsecret"
}
end
Example usage of factory in your tests:
test "xml" do
xml = Factory.build(:account).to_xml # build but not save object
assert !xml.include?("account-id")
end
test "should authenticate user" do
account = Factory.create(:account) # creates and save object
assert_equal Account.authenticate('alexis', 'topsecret'), account
end
test "should create account" do
assert_difference('Account.count') do
post :create, :account => Factory.attributes_for(:account) # returns hash
end
end
FAQs
Unknown package
We found that daeltar-mini_factory demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.