Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails Engines & RSpec
Search
Amanda
January 21, 2016
Technology
0
190
Rails Engines & RSpec
Amanda
January 21, 2016
Tweet
Share
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
47
Aprendizados de um projeto Elixir OTP
amandasposito
4
370
SOLID - Dependency inversion principle
amandasposito
0
46
Como concorrência funciona em Elixir?
amandasposito
1
200
Programação Funcional & Elixir
amandasposito
3
110
Ecto, você sabe o que é ?
amandasposito
4
200
Novidades no Rails 5
amandasposito
0
72
Elixir e Phoenix
amandasposito
3
520
Elixir em 5 minutos
amandasposito
1
79
Other Decks in Technology
See All in Technology
日本におけるデータエンジニアリングのこれまでとこれから
foursue
9
1.9k
SPI原点回帰論:事業課題とFour Keysの結節点を見出す実践的ソフトウェアプロセス改善 / DevOpsDays Tokyo 2024
visional_engineering_and_design
4
1.3k
転移学習とドメイン適応の基礎
kmatsui
2
570
WebアプリケーションにおけるPDOの使い方入門 / phpcon odawara 2024
meihei3
2
420
反実仮想機械学習とは何か
usaito
PRO
6
1.3k
A (short) History of AI
harishpillay
0
100
[2024年3月版] Databricksのシステムアーキテクチャ
databricksjapan
7
1.9k
元インフラエンジニアに成る / Human Resources to Human Relations
bobtani
1
680
Signals Unleashed: The Full Guide
rainerhahnekamp
0
350
「ふりかえりのふりかえり」をふりかえり、実のあるふりかえりにする
naitosatoshi
0
210
長期運用プロジェクトでのMySQLからTiDB移行の検証
colopl
1
460
普段有償でサポート業務をしているCSAが技術知見を無料で公開する理由
07jp27
1
620
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
36
2k
Testing 201, or: Great Expectations
jmmastey
27
6.3k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Debugging Ruby Performance
tmm1
69
11k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
320
20k
Automating Front-end Workflow
addyosmani
1354
200k
Writing Fast Ruby
sferik
619
60k
Navigating Team Friction
lara
177
13k
Bootstrapping a Software Product
garrettdimon
PRO
301
110k
Bash Introduction
62gerente
604
210k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
18
1.7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
29
6k
Transcript
Rails Engines e RSpec
“Engines can be considered miniature applications that provide functionality to
their host applications. “ http://guides.rubyonrails.org/engines.html
Ruby Gem + MVC “A Rails application is actually just
a ‘supercharged’ engine”
None
É uma maneira de organizar e compartilhar código reutilizável através
de uma ou mais aplicações.
Core Modulo Financeiro Modulo Logística
Redundância Melhor manutenção
Trade-offs
Criando uma Rails Engine do Zero
Nome da nossa engine Sem os arquivos do Test::Unit Plugin
isolado por namespace Cria com uma estrutura padrão com a dummy application especificada
Dummy Application Quando geramos a engine, a partir da linha
de comando, existe uma pequena aplicação dentro do diretório de testes.
None
Ela existe básicamente por que não existe um jeito de
se testar uma Rails Engine fora de uma aplicação Rails
.gemspec
As dependências devem ser adicionadas nesse arquivo para evitar conflitos
na hora de plugar a engine
None
rails generate rspec:install
Obrigada!
Referências https://medium.com/@amandasposito/rails-engines-e-rspec-6e7a8645dc5b#.nemad0vpz http://rspec.info/ http://guides.rubyonrails.org/engines.html https://www.bignerdranch.com/blog/intro-to-rails-engines/ http://stackoverflow.com/questions/6118905/rails-3-1-engine-vs-mountable-app